Preview Button Revised

  • Thread starter Thread starter Andrea
  • Start date Start date
A

Andrea

I have a button on a form that when clicked, will run a
parameter query that will ask the user for the ID number
of the form (underlying table)and then it will generate a
report for that ID. Is there a way that I can create a
button that when clicked, it will automatically enter the
current ID number in the parameter query to generate the
report?
 
Andrea,
If you're calling the report from a form with an ID, then replace the ID
parameter in your report query with... (use your own names)
=Forms!frmMyCallingForm!ID
This will
 
Andrea,
If you're calling the report from a form with an ID, then replace the ID
parameter in your report query with this criteria... (use your own names)
=Forms!frmMyCallingForm!ID

This will filter the report with the value ID displayed on the active
calling form.
OR...
To give the user more flexibility, I would just open up an InputBox with
the form's ID already entered, as the InputBox default, and allow the user
to accept the default, or manually enter an ID. Works two ways...
hth
Al Camp
 
Andrea,
If you're calling the report from a form with an ID, then replace the ID
parameter in your report query with this criteria... (use your own names)
=Forms!frmMyCallingForm!ID

This will filter the report with the value ID displayed on the active
calling form.
OR...
To give the user more flexibility, I would just open up an InputBox with
the form's ID already entered, as the InputBox default, and allow the user
to accept the default, or manually enter an ID. Works two ways...
hth
Al Camp
 
(had a problem on my previous response... pls disregard)
Andrea,
If you're calling the report from a form with an ID, then replace the ID
parameter in your report query with this criteria... (use your own names)
=Forms!frmMyCallingForm!ID

This will filter the report with the value ID displayed on the active
calling form.
OR...
To give the user more flexibility, I would just open up an InputBox with
the form's ID already entered (as the InputBox default) and allow the user
to accept the default ID, or manually enter an ID. Works two ways...
hth
Al Camp
 
Back
Top