Produce report based on field content

gls

Want to be guru
Local time
Today, 23:22
Joined
Mar 5, 2008
Messages
40
I have a form called frmNon_Compliance, on that form I have a field called Non_Compliance number which is an auto number. The form is linked to tblNon_Compliance. When the user fills in the form and clicks on the button that is called "email report", I have the report based on a query and I have criteria where a input box appears for the user to enter the Non Compliance number that was auto generated on the form. Therefore the report appears with the correct record. Is there a way that I can have the report know what non Compliance number is on the current form. I expect this would only work when the form is active and when the button is pressed from the form. The button would only be pressed from this location. Appreciate your help.
 
In the report query, instead of a parameter for the number refer to the control name that holds the NonCompliance number.

Code:
Forms!formname.Form!controlname

Or if this control is in a subform:
Code:
 Forms!formname.Form!subformcontrolname.Form!controlname
 
Thankyou for this tip, much appreciated.
 

Users who are viewing this thread

Back
Top Bottom