Today's Results

Mik3

Registered User.
Local time
Today, 22:40
Joined
Jul 10, 2003
Messages
60
Hi,
Is it possible to filter data in a report?
I need to show results of today's date. The results are sorted by Date, however I would like to show only the trasactions which happened today.

Thanks,


Mike
 
Try customising this and placing it under the button you use to open to open the report

Dim strCriteria As String
Dim strDoc As String

strDoc = "RptName"
strCriteria = "[datefield]="& date

DoCmd.OpenReport strDoc, acViewPreview, , strCriteria
DoCmd.Maximize

This allows you to use the report in a number of ways. If the report is just used for the one purpose, you could also just type date() as the criteria in the date column of the underlying query.
 
I already tried putting Date() in the criteria of the query, but I get an error: "expression typed incorrectly or too complex..."
 
On the button, try changing the criteria to

Code:
strCriteria="[datefield]=date()"
 

Users who are viewing this thread

Back
Top Bottom