Trouble generating report with dialog box/parameter query

G

Guest

I am using Access 2000 and am having trouble generating a report. I created
an unbound form that prompts for criteria for the query associated with this
report. I set up all of the macros that I needed to open, close, cancel the
query. I tied the macros to my report on the report properties (Event: OnOpen
- uses the macro to open the dialog box, OnClose - uses the macro to close
the dialog box). The dialog box prompts for a start date and an end date for
the report. The controls on the dialog box/form are tied to the query to
satisfy the criteria for the date field on the criteria. My problem is this:
I open the report and the dialog box pops up prompting for a start and an end
date (OK so far), I fill in the dates and click the OK button (the OK button
is tied to a macro to make the form/dialog box not visible) and the form
disappears (still OK), but then the preview of my report does not appear. I
tried adding a preview button to the dialog box to open the report but I
receive a message box stating that the "OpenReport Action was cancelled". I
know that I am forgetting something simple but for the life of me cannot find
it. Any help?
 
S

Steve Schapel

Doogie,

I wouldn't do it this way. I would open the form first, enter your date
criteria, and then click a button on the dialog form to run the report.
 

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