Date Formula

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

Guest

I have the following formula in a query:

Between NZ([Forms]![ReportForm]![txt1st],#10/11/2004#) And
NZ([Forms]![ReportForm]![txt2nd],Date())

Instead of having #10/11/2004# as default date, I would like it to simply
search for the earliest date entered in that field and start from it.
Basically, I need the opposite of the Date() funciton, I need the earliest
date to automatically calculate if nothing is put into the text field.
Everything will be included this way. Does anyone know the formula command?
 
Unless you have dates more than 105 years ago, you could use:
Nz([Forms]![ReportForm]![txt1st], #1/1/1900#)
 
Try using the Dmin

Between NZ([Forms]![ReportForm]![txt1st],DMin("[DateField]","[TableName]"))
And NZ([Forms]![ReportForm]![txt2nd],Date())

But I would enter a fix date, as you did, that I know that you can't have
any earlier date then that, so the query will be faster.
 

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

Date Diff Issue 4
Using DateAdd and IIF conditions in a Query 2
Date Dispaly 3
Filtering Dates 3
DATE/TIME MATH ISSUE!!!! 2
Date Diff Formulas 7
Excel Help with dates 2
Show 'From' and 'To' Dates on a Report 6

Back
Top