open a report using a form

paul.clarke

Registered User.
Local time
Today, 19:48
Joined
Mar 13, 2009
Messages
51
Hi.
I want to open a report using my form, this is easy enough, but i cant figure out how i get the report to show details for the selected order number on my form.

At present i have the queries which run the form and report set up so you have to enter the order number. This is fine for the form, but then when you click the button to preview report, you have to enter the order number again. How can i link these, from what i can see using the northwind sample access database, there are macros, but i have no idea how these are set up or even if this is the best way of doing this task.

How can i accomplish this? Please advise as to how i need the query for the report to be set up, i.e still have the enter order number parameter, or remove it so it picks up every record, and let the form tell report which to use.

I have no experince in coding, i have copied and pasted stuff to get to open specific excel file etc, but thats it, so im hoping its not too much of that.

i tried a subform but i cant seem to get to work.

Thanks in advance.
 
In the query for your report have the criteria for your order number set to the following.

[Forms]![Form Name]![Field Name]

This tells the report to open based upon the order number that is in current form.

Form Name = the name of your form
Field Name = the name of your order number field

Replace items in RED with your information.

Hope this helps
 
Last edited:

Users who are viewing this thread

Back
Top Bottom