G
Guest
I have a query that derives its criteria from a form. On the form I have 2
fields: Beginning Date and Ending Date.
Here's what I want to accomplish: If the Start date is null, then have it
use <=End Date; otherwise if the Start date and End date are filled in, I
need it to say Between start date and end date.
iif(isnull(Forms!frmMyForm![txtStartDate]),tblMyTable!dtmStartDate <=
Forms!frmMyForm![txtEndDate], tblMyTable!dtmStartDate between
Forms!MyForm!txtStartDate and Forms!frmMyForm!txtEndDate)
It seems that it doesn't recognize the operators of less than or equal to
nor the Between statement.
Either I am writing the syntax incorrectly or it cannot be done in an IIF
statement.
Thanks,
D.Collins
fields: Beginning Date and Ending Date.
Here's what I want to accomplish: If the Start date is null, then have it
use <=End Date; otherwise if the Start date and End date are filled in, I
need it to say Between start date and end date.
iif(isnull(Forms!frmMyForm![txtStartDate]),tblMyTable!dtmStartDate <=
Forms!frmMyForm![txtEndDate], tblMyTable!dtmStartDate between
Forms!MyForm!txtStartDate and Forms!frmMyForm!txtEndDate)
It seems that it doesn't recognize the operators of less than or equal to
nor the Between statement.
Either I am writing the syntax incorrectly or it cannot be done in an IIF
statement.
Thanks,
D.Collins