I have created a QBF, which depends on what the search criteria users enter into the form. The form variables
will be feed into the query criteria dynamic.
The problem is I want the user be able to search based on the date, there're startdate and enddate on the search form,
and those are all optional fields. The startdate and enddate
will search on the same field in the table. I don't know
how can I feed those form value into the query criteria dymanic since they are optional.
IF I use the following criteria in the query
Between [Forms]![formname]![txtStartTime] And [Forms]![formname]![txtEndTime]
then they have to be required fields.
I've used IIF(not IsNULL(...... kind of complex expression,
but got all kind of errors. So if you have any codes similar
to this, and working, please show me.
I've been stuck with this part for a while, please help.
Thank you.
will be feed into the query criteria dynamic.
The problem is I want the user be able to search based on the date, there're startdate and enddate on the search form,
and those are all optional fields. The startdate and enddate
will search on the same field in the table. I don't know
how can I feed those form value into the query criteria dymanic since they are optional.
IF I use the following criteria in the query
Between [Forms]![formname]![txtStartTime] And [Forms]![formname]![txtEndTime]
then they have to be required fields.
I've used IIF(not IsNULL(...... kind of complex expression,
but got all kind of errors. So if you have any codes similar
to this, and working, please show me.
I've been stuck with this part for a while, please help.
Thank you.