Opening Report from Form - tricky and urgent (1 Viewer)

B

Browser

Guest
I am viewing a record in a form, and want to be able to click a button and view a report on that particular record.
The report would usually list all records, but based on the ID of the record on the form, we wish to filter the report to show only that records data.

ANY help greatly appreciated as we're in a bit of a bother.
cheers
dan
 

BoroLee

Registered User.
Local time
Today, 23:04
Joined
Aug 30, 2000
Messages
90
Create a report based on the data in the form. Then create a macro which Opens the Report, but has criteria which is equal to the form.

I've done it before, and it works fine.

If I don't make sense, e-mail me.

Lee.
 

Neal

Registered User.
Local time
Today, 23:04
Joined
Feb 17, 2000
Messages
116
You can put a command button on the form and have this as the code behind the On Click Event:

Docmd.OpenReport "YourReportName",,,"[RecordId] = forms!YourFormName!RecordID"
 

Chris RR

Registered User.
Local time
Today, 17:04
Joined
Mar 2, 2000
Messages
354
Or, create a query that uses the form fields as its criteria, then base the report on that query.
 

Users who are viewing this thread

Top Bottom