Opening a form for parameter input that goes with a report

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have an unbound form that I am trying to open from a reports Open Event.

It is working, but the form does not seem to take the focus. It just pops
up and then the query for the report executes without ever getting the
parameters from the form.

Can someone tell me how I get the form to take the focus long enough for a
user to enter some parameters?

Thank you for any assistance.
 
Jack Watson said:
I have an unbound form that I am trying to open from a reports Open Event.

It is working, but the form does not seem to take the focus. It just pops
up and then the query for the report executes without ever getting the
parameters from the form.

Can someone tell me how I get the form to take the focus long enough for a
user to enter some parameters?

Use the WindowMode:=acDialog argument on the OpenForm
method.
 
I have an unbound form that I am trying to open from a reports Open Event.

It is working, but the form does not seem to take the focus. It just pops
up and then the query for the report executes without ever getting the
parameters from the form.

Can someone tell me how I get the form to take the focus long enough for a
user to enter some parameters?

Thank you for any assistance.

Open the form in acDialog.
DoCmd.OpenForm "FormName", , , , , acDialog
 
You are doing it backwards, The form should have a button that opens the
report after the user enters the parameters.

Go to www.joshdev.com to see a good set of tools to send parameters to reports
 

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

Back
Top