How do I display a certain value based on a table?

Galphanore

Registered User.
Local time
Today, 17:38
Joined
Apr 5, 2006
Messages
23
I have a table with three fields, StartDate, EndDate and Holiday Name. What I am trying to do is have a query search this table and determine if a date is between any of the startdate and enddate fields, and if it is have it output "Holiday", and have it output "Non-Holiday" if it does not.
 
Holiday: IIf((Select Count("*") from [HolidayTableName] where [DataTableName].[DateFieldName] between [StartDate] and [EndDate]), "Holiday", "Non-Holiday")

replace with the correct table names and date field name.
.
 
Last edited:

Users who are viewing this thread

Back
Top Bottom