Date selection

fibayne

Registered User.
Local time
Today, 21:49
Joined
Feb 6, 2005
Messages
236
Hi

I have this expression in a query on which a report is based and would like to use Between And to select the date period, but cant get it to work, the table has Feb and March dates in it but the query brings out March dates if I select 01/02/07 and 28/02/07 (UK date format) ..it works if I put for example "01/02/07" in the criteria of the query ie it shows all records dated 01/02/07

MyDate: Format([LogInTime],"dd/mm/yy")

As always any help, advice, pointers would be gratefully appreciated
cheers
Fi
 
Your query needs two dates (from date) and (to date) to
accomplish what you want. One way to supply these dates is
via textboxes in your form.

In design mode of your query, in the criteria line of the
date field, you need to enter somethings liike this:

Between forms!formName!fromDate AND forms!formName!ToDate

In the AfterUpdate event code of the ToDate on your form,
you issue a command to open the report which uses the query
created above. Your report should then pick up the date ranges
specified in your date textboxes.

There are other ways to get the from and to dates from the user.
I am sure others in this forum have used an approach other than the
one above.
 

Users who are viewing this thread

Back
Top Bottom