Can't open report

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
 
J

Janet Russell

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.
 
V

Van T. Dinh

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top