A
AccessNoviceButTrying
Hi All,
Have a question I was hoping someone could help me with.
I have a table which has a field to capture close dates.
I also have a form which allows user to enter a "to" and "from" date.
I want to the query to pull all the records that have a closed date between
the "to" and "from" dates the user has selected or to pull all the records if
they leave it blank.
Between Nz([Forms]![frmadHocReports]![TODate],[tblMainIDDate]) And
Nz([Forms]![frmAdHocReports]![FromDAte],[tblMainIDDate])
The above code works to pull records that fall between the dates when
entered but if the "to" and "from" fields are left blank, the query pulls all
the records but only if it has a close date. I want the query to pull all the
records, even if it doesnt have a close date and it blank.
Any help would be greatly appreciated.
Thanks
Have a question I was hoping someone could help me with.
I have a table which has a field to capture close dates.
I also have a form which allows user to enter a "to" and "from" date.
I want to the query to pull all the records that have a closed date between
the "to" and "from" dates the user has selected or to pull all the records if
they leave it blank.
Between Nz([Forms]![frmadHocReports]![TODate],[tblMainIDDate]) And
Nz([Forms]![frmAdHocReports]![FromDAte],[tblMainIDDate])
The above code works to pull records that fall between the dates when
entered but if the "to" and "from" fields are left blank, the query pulls all
the records but only if it has a close date. I want the query to pull all the
records, even if it doesnt have a close date and it blank.
Any help would be greatly appreciated.
Thanks