G
GOL
I created a form to gather date criteria for a query instead of using a
parameter pop up box. You simply put the dates in the txt boxes and the
query references its criteria to the txt boxes. I have two txt boxes for a
range of dates to view (ex. 1/1/04 to 1/6/04). Since not everyone knows the
exact date the database was installed (the earliest available date), my boss
wants it formatted so that if the first box is left blank, then it retrieves
from the first date entered, and if the 2nd txt box is left empty it
retrieves to the most recent data. (If both empty it retrieves all).
Thinking I could make an IIf statement stating something like
IIf(IsNull([nameoftxt1]),"1/1/1925",[nameoftxt1]) and do the same for the 2nd
txt box. 1/1/1925 would work because I know no data was before this date,
then I could use some date like 1/1/2080 for 2nd box. However the txt boxes
aren't fields and the form they are on isn't bound to any table, its just a
criteria for a query. How can I make some kind of statement so that this
will work, the IIF statements I've tried don't work.
parameter pop up box. You simply put the dates in the txt boxes and the
query references its criteria to the txt boxes. I have two txt boxes for a
range of dates to view (ex. 1/1/04 to 1/6/04). Since not everyone knows the
exact date the database was installed (the earliest available date), my boss
wants it formatted so that if the first box is left blank, then it retrieves
from the first date entered, and if the 2nd txt box is left empty it
retrieves to the most recent data. (If both empty it retrieves all).
Thinking I could make an IIf statement stating something like
IIf(IsNull([nameoftxt1]),"1/1/1925",[nameoftxt1]) and do the same for the 2nd
txt box. 1/1/1925 would work because I know no data was before this date,
then I could use some date like 1/1/2080 for 2nd box. However the txt boxes
aren't fields and the form they are on isn't bound to any table, its just a
criteria for a query. How can I make some kind of statement so that this
will work, the IIF statements I've tried don't work.