I tried some code like this in a query using IIf
If [StartDate] = [EndDate], Then just print [StartDate], else [StartDate] "thru" [EndDate]
It just displays a null field.
I tried some code like this in a query using IIf
If [StartDate] = [EndDate], Then just print [StartDate], else [StartDate] "thru" [EndDate]
It just displays a null field.

This month, every Windows Secrets subscriber can download a one-chapter excerpt of Windows 7: The Missing Manual.Windows 7: The Missing Manual provides valuable information to help you overcome these difficulties in learning a new operating system. Subscribe today to download your free excerpt.
If your StartDate is null, the result will be null. Assuming it isn't null, this should work:
IIF([StartDate]=[EndDate],[StartDate],[StartDate] & " thru " & [EndDate])
Mark Liquorman
See my website for Tips & Downloads and for my Liquorman Utilities.
I tried that formula. However, only the true part works, ie Start date.
what does not work is the false part. for some reason it displays nothing. Seems it is being confused by 2 date fields and the "thru"
paul
Well, I don't know what to tell you. I tried it on a table I had, and it worked perfectly.
Mark Liquorman
See my website for Tips & Downloads and for my Liquorman Utilities.
I just tried it on another databse and it worked as well. thanks for the help