Code for Report

stevemccauley

Registered User.
Local time
Today, 23:46
Joined
Aug 8, 2001
Messages
75
I would like to have a query run for my report with the "AutoNumber" of the open form as the main grouping link when the print button is pressed. What type of code do I need to enter, and where?

Thanks,
Steve
 
Reference the forms Field in the Query's Criteria

=Forms![Formname].[AutonumberFieldname]
 
Another way to do this which will give you more flexibility is to use the where arguement of the OpenForm Method. Filtering the report this way allows you to open the report from multiple places without having a problem caused by its query referencing a particular form.
 

Users who are viewing this thread

Back
Top Bottom