Opening a form for parameter input that goes with a report

J

Jack Watson

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

Marshall Barton

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

fredg

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
 
J

jl5000

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
 
Top