Link to home
Start Free TrialLog in
Avatar of SteveL13
SteveL13Flag for United States of America

asked on

How query all records if date fields are left blank on a form

I have a form with has two date fields... txtStart and txtEnd.  Then I have a query which has this for the criteria...

Between [Forms]![frmSelectDatesForInvestPerfRpt]![txtStart] And [Forms]![frmSelectDatesForInvestPerfRpt]![txtEnd]

But if the user leaves the date fields blank on the form I want the query to return all records.

I tried...

Between "*" & [Forms]![frmSelectDatesForInvestPerfRpt]![txtStart] And [Forms]![frmSelectDatesForInvestPerfRpt]![txtEnd] & "*"

But it doesn't work.

????
ASKER CERTIFIED SOLUTION
Avatar of mbizup
mbizup
Flag of Kazakhstan image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial