Date range for report

G

Guest

Hi,

I tried to set up controls in a form in order to prompt for date criteria in
a report. I added textboxes to the report, with references to the forms
controls, in the controlsources for those boxes. When I try to run the
report it doesn't prompt for the dates, it just puts #Name? where those
controls are.

If I open the form and enter the dates directly into the form and click ok
it brings up the report with the proper filters though. Is there a way to
make the report open the form to prompt for the dates, rather than having to
open the form itself?
 
G

Guest

You can open the form using acDialog from the On Open event of the report. I
hate this method and have always recommended opening the form first and then
open the report.
 
G

Guest

i tried
DoCmd.OpenForm "frmWhatDates", , , , , acDialog

it opens the form fine, but when I click the OK button it gets stuck and
doesn't open the report. - maybe this is why you hate this method. How can I
set this up so that is user friendly and the user doesn't have to open up the
form?
 
G

Guest

Marting Green has some great stuff on how to do this at
http://www.fontstuff.com/access/index.htm.

There are also examples of the open acdialog in northwind.

It seems to me the user is going to need to do something anyway to open the
form or report. I just prefer to have the form open and then 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