Can't open report

  • Thread starter Thread starter francisco
  • Start date Start date
F

francisco

I have a form with a command button that opens that report.
the thing is that I want that the report opens at the page
I'm working on only.
I hope someone can help
T.I.A.
francisco
 
Is your report based on a query instead of a table? If
so, make sure that the primary key field is included in
the query. On the criteria line for that field in the
query, enter the following:

[Forms]![Name of your form]![Primary key field]

Replace "Name of your form" with the name of your form.
Replace "Primary key field" with the name of your primary
key field.

If the report if not based on a query, it is a good idea
to do so.
 
In your OpenReport statement, use the "wherecondition" argument to
restrict/filter the RecordSource of your Report to just the Record currently
display on your Form.

Check Access VB Help on the arguments of the OpenReport Method.
 
Back
Top