Very simple question

Noreene Patrick

Registered User.
Local time
Today, 05:15
Joined
Jul 18, 2002
Messages
223
I have a very quick question. My report pulls dates from a table that has every day of the year in long format for the next few years . Each page in the report is by date such as: page 1 heading is 9/17/2002 and so forth in succession.

All I want to do is to open the report every day at the page that is the current date.

Would it be a vb answer something like

docmd. openreport "calendar"
docmd. gotocontrol "calcdate" (something) =date()

Am I on the right track?

Thanks a bunch
 
I haven't tried it, but this may work:
Code:
Dim rptCalendar as Report
rptCalendar = "Calendar"
DoCmd.OpenReport rptCalendar
If (variable for your date on the report) <> Date()
  rptCalendar.NextRecord
End If
 
Thanks for the answer

but, whenever I put in this code, it highlights
rptCalendar = "Calendar" (Actually it only hightlights the words rptCalendar)

and gives me this message:
Compile error
Invalid use of property

(and when I go to help it talks about get and let)

Can you suggest what I should do?

Thanks again
 
Another thing you can try is setting the recordsource of the report to a query. In the query set the criteria in the date field to Date().
 
I did what you suggested and it worked but I cannot surf backward to see earlier dates only dates now and in the future.
The navigation bar is grayed out for moving backward.

And you know, I didnt make myself clear in the beginning.

I want the report to open to current date but be able to move backward or forward if needed. I know you have seen calendars in Lotus Notes and Outlook that allow you to see past and future entries.

That is what I need also.

Can you help with that?

Thanks so much
 
If I understand you correctly you want to view the record on a report in print preview mode instead of actually printing it out. If I'm correct I'd probably just recommend to view the record in a form. I've never used reports that way. It'd probably be much easier to use that way. I'm not even sure you can use the gotorecord cmd in a report.

Does anyone else know?
 

Users who are viewing this thread

Back
Top Bottom