form open report

  • Thread starter Thread starter brigid
  • Start date Start date
B

brigid

I have a form that opens a report when a command button
is clicked. However the user is first prompted for a
value which is included in the form. How do I pass this
value without having to manually enter it?
 
I have a form that opens a report
when a command button is clicked.
However the user is first prompted
for a value which is included in the
form.

Please clarify what you mean by "user is first prompted for...". Do you mean
you have a parameter query, or that you have VBA code or macro that uses an
InputBox, or that you have a Control on the Form where the user is to enter
the value.
How do I pass this value without
having to manually enter it?

Please clarify "How do I pass...". Depending on the first answer above, from
where/to where do you want to pass it, and for what purpose? For example, "I
want to use this value to limit the records printed in the report." or "I
just want this value to be printed on the report."

Finally, what version of Access are you using?
 
the user is prompted by a query parameter, and i want to
pass this value because currently the user opens a form,
looks at a certain value, then opens a report and is
prompted for the same query parameter. since this query
value is included as a field in the form i would like to
click a button and the report opens based on the value
shown on the form.

thank you very much for your help!
 
brigid,

Remove the report's query parameter and add WHERE clause like that:

.... WHERE [TableColumn]=Forms![Your Form Name]![ControlName] ...

Hope this help you.

Vladimir
 
Back
Top