G
Guest
Greetings. I am having a problem with the code below:
Between [Forms]![frm_CalculateUsage]![BeginDate] And
IIf([Forms]![frm_CalculateUsage]![EndDate]=Null,Date(),[Forms]![frm_CalculateUsage]![EndDate])
What I am trying to do is the following:
I have a form linked to a query. The form has to unbound text boxes,
"BeginDate" and "EndDate."
With the above code, I was trying to make it so that the user could put in
botha BeginDate and EndDate, or only the BeginDate and (if left blank) the
EndDate would default to the current date.
Then, by pressing a command button on the form, the query would pull up
information between the two dates. It works if I put in a BeginDate and an
EndDate, but if I leave EndDate blank, the query acts as though it is working
for a little while, then the hour glass turns back into apointer, with no
results given. Please help. Thansks.
Between [Forms]![frm_CalculateUsage]![BeginDate] And
IIf([Forms]![frm_CalculateUsage]![EndDate]=Null,Date(),[Forms]![frm_CalculateUsage]![EndDate])
What I am trying to do is the following:
I have a form linked to a query. The form has to unbound text boxes,
"BeginDate" and "EndDate."
With the above code, I was trying to make it so that the user could put in
botha BeginDate and EndDate, or only the BeginDate and (if left blank) the
EndDate would default to the current date.
Then, by pressing a command button on the form, the query would pull up
information between the two dates. It works if I put in a BeginDate and an
EndDate, but if I leave EndDate blank, the query acts as though it is working
for a little while, then the hour glass turns back into apointer, with no
results given. Please help. Thansks.