Full Version: form details into a report
UtterAccess Discussion Forums > Microsoft® Access > Access Reports
aman909
Hello,

What im trying to do is to create a report from a form. I have made a template for the report i would like to use.

What i have is a form which contains details of a customer. What i would like to do is when on a certain customer to be able to view their details that are shown on the form to appear on a report which can be printed off.

What is the best way to be able to do this?
dashiellx2000
Create a query that returns only the data displayed on the form (i.e. Put =Forms!frmName!ControlName changing frmFormName to match your actual form's name and control name to the control on your form that contains the record primary key). Bind your report to new query.

HTH.
aman909
Once i have created the query, where do i place the code, =Forms!frmName!ControlName?
dashiellx2000
In the criteria line for the record's primary key.
aman909
That seems to be working but it keeps on asking for a parameter value. How do i stop this?
dashiellx2000
The form needs to be open for the query to work properly (i.e. return on the record displayed). Is the form open?
aman909
Yes the form is open. This enter parameter value occurs when i use the button from the form to open the report and also when i try and open the report on its own.
dashiellx2000
Assuming you have named the form and control in the criteria correctly, you should not be getting the message. Let me see if I can whip up an example for you.
dashiellx2000
Ok, here is a simplistic example of what I'm suggesting. Rip it apart and see how it works. If you have any questions, UA will be here.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.