Multiple Queries

  • Thread starter Thread starter Courtney
  • Start date Start date
C

Courtney

Hi!

I have about 20 'Append Queries' that have Start Dates and End Dates being
prompted for each query. How can I consolodate them into one Start and End
Date prompt? Instead od typing in yesterday's date over and over again.
 
Courtney said:
Hi!

I have about 20 'Append Queries' that have Start Dates and End Dates being
prompted for each query. How can I consolodate them into one Start and End
Date prompt? Instead od typing in yesterday's date over and over again.


They're all the same start and end dates? One approach is to put the dates
into text boxes on a form -- possibly hidden text boxes, possibly a hidden
form -- and have the queries reference the text boxes on the form for their
criteria.
 
Hi!

I have about 20 'Append Queries' that have Start Dates and End Dates being
prompted for each query. How can I consolodate them into one Start and End
Date prompt? Instead od typing in yesterday's date over and over again.

As Dirk suggests, use a form with a criterion like
= [Forms]![YourFormName]![txtStartDate] AND < DateAdd("d", 1, [Forms]![YourFormName]![txtEndDate])

Or, if it's always yesterday's date as the start and today's as the end,
= DateAdd("d", -1, Date()) AND < DateAdd("d", 1, Date())

to get from midnight at the beginning of yesterday to midnight this coming
night (two full days).
 
Back
Top