Report only entries from before todays date?

studiosam

New member
Local time
Today, 19:28
Joined
Sep 30, 2010
Messages
3
Is there a way for me to make my report only show entries dated today or before today?
 
You can either modify the underlying recordsource of the report to use a query with the criteria of

<= Date()

or

You can use a form to launch the report (and others) and in the code behind the button you can use:
Code:
DoCmd.OpenReport "ReportNameHere", acViewPreview, ,"[YourDateFieldNameHere] <= Date()
 
Question was already asked and answered here:

http://www.access-programmers.co.uk/forums/showthread.php?t=123671

Please don't post the same question twice.

Didn't know about the other thread. Thanks Paul. And studiosam - Paul is correct. You should not post the same question in multiple threads. I don't know why you didn't get it the first time. But if you don't understand don't post a new question, continue on the thread you got the answer from.
 
Thanks guys for your speedy responses. I reposted here as I initially thought I may have posted in the wrong forum, I do apologise for the multiple posts.

I am very new to access so I appreciate these questions may seem stupid!

I tried the first method of creating a query with the criteria of <= Date() , but I couldn't figure how to link this query to the appropriate part of my report, without affecting the other data in the report. The recordsource is linked to my table to retreive this data.

my recordsource in my report is this:

SELECT Contacts.LastName, Calls.CallDate, Calls.Subject, Calls.Notes, [FirstName] & " " & [LastName] AS [Full Name] FROM Contacts INNER JOIN Calls ON Contacts.ContactID=Calls.ContactID;

I'd like the Calls.CallDate part to link to my query to display only those entries that are <= Date() .

Please tell me if this seems like the babblings of a mad man!

edit: I have deleted my other post.
 
Thanks guys for your speedy responses. I reposted here as I initially thought I may have posted in the wrong forum, I do apologise for the multiple posts.

I am very new to access so I appreciate these questions may seem stupid!

I tried the first method of creating a query with the criteria of <= Date() , but I couldn't figure how to link this query to the appropriate part of my report, without affecting the other data in the report. The recordsource is linked to my table to retreive this data.

my recordsource in my report is this:

SELECT Contacts.LastName, Calls.CallDate, Calls.Subject, Calls.Notes, [FirstName] & " " & [LastName] AS [Full Name] FROM Contacts INNER JOIN Calls ON Contacts.ContactID=Calls.ContactID;

I'd like the Calls.CallDate part to link to my query to display only those entries that are <= Date() .

Please tell me if this seems like the babblings of a mad man!

edit: I have deleted my other post.

You need to modify the recordsource for your report.

Code:
SELECT Contacts.LastName, Calls.CallDate, Calls.Subject, Calls.Notes, [FirstName] & " " & [LastName] AS [Full Name] FROM Contacts INNER JOIN Calls ON Contacts.ContactID=Calls.ContactID[B][COLOR=red] WHERE Calls.CallDate <= Date()[/COLOR][/B];
 

Users who are viewing this thread

Back
Top Bottom