wildcard for date criteria to return all records

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I use an unbound form with combo boxes to select report criteria. In the
query source for the report I have a [inc_date] with the criteria:

Between [Forms]![Myform]![txtBegin] And [Forms]![Myform]![txtend] which
returns all records betwen the dates entered,

I would like to add and "& 'wildcard'" to the critera to return all dates if
none is selected but cannot get a wildcard to work.

Are there any suggestions please??

Thank you
 
You can't use wildcards with dates: they're only for text.

You can try:

Between [Forms]![Myform]![txtBegin] And [Forms]![Myform]![txtend] OR
[Forms]![Myform]![txtBegin] IS NULL OR [Forms]![Myform]![txtend] IS NULL

or

Between Nz([Forms]![Myform]![txtBegin], #1/1/100#) And
Nz([Forms]![Myform]![txtend], #12/31/9999#)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Criteria from Form 3
Wildcard in query 10
Return All Records 3
Criteria for "All" in a query 5
wildcard in a query form 2
How assume wildcards in a query criteria 3
Record contains wildcard char 2
Wildcard Table 4

Back
Top