"Enter Parameter Value" for my start-up pop-ups

S

Susy

I have lots of forms and reports driven by user-defined
parameters on pop-up forms. These forms use unbound
controls. In most cases, the user selects a beginning
date, and ending date, and a location, and receives a set
of data for that range. The forms and reports all work
very well.

But when each form or report is used for the FIRST time
for each session, a dialog box called "Enter Parameter
Value" appears for each of the fields that calls for a
value (e.g., Forms!Set Date!BeginDate). We just click OK
through them to get to the pop-up.

I've tried setting defaults in the unbound controls but
that hasn't worked. I've also tried opening the pop-up
dialog boxes before the form with a message to the user to
just click OK and get on with it.

But what I really want is to learn what's going on and how
to avoid it. Any help is greatly appreciated.

Thaks, Susy
 
M

Marshall Barton

Susy said:
I have lots of forms and reports driven by user-defined
parameters on pop-up forms. These forms use unbound
controls. In most cases, the user selects a beginning
date, and ending date, and a location, and receives a set
of data for that range. The forms and reports all work
very well.

But when each form or report is used for the FIRST time
for each session, a dialog box called "Enter Parameter
Value" appears for each of the fields that calls for a
value (e.g., Forms!Set Date!BeginDate). We just click OK
through them to get to the pop-up.

I presume that your report's record source query's are of
the form Forms!popup.control, if so, there is something
wrong with the order in the code that opens the form and the
report. The pop-up form should be opened before the report
or from the report's Open event.

If I guessed wrong, please post back with more details about
how you manage the form/report and the query's parameters.
 
G

Guest

Marsh:
The pop-up dialog box is always in the open event. It
opens first, waits for user selections, then opens the
report or data-entry form. The "enter parameter value"
message occurs only once each session. After the user has
entered something into the dialog box, the message never
recurs.

I didn't mention that I have a Main Menu with all the
forms and reports on buttons. Does that make a difference?
For instance, the user clicks on "Graph Data," which
brings up the "Graph" report, with the pop-up dialog
box "Set Date and Location" in the open event. "Set Date
and Location" has unbound controls that call for date from
fields in the the crosstab query that drives the graph.

It's not a horrible problem and as I said, I have a
workaround, but I'd like to know what's happening.

Thanks,
Susy
 
M

Marshall Barton

Marsh:
The pop-up dialog box is always in the open event. It
opens first, waits for user selections, then opens the
report or data-entry form. The "enter parameter value"
message occurs only once each session. After the user has
entered something into the dialog box, the message never
recurs.

I didn't mention that I have a Main Menu with all the
forms and reports on buttons. Does that make a difference?
For instance, the user clicks on "Graph Data," which
brings up the "Graph" report, with the pop-up dialog
box "Set Date and Location" in the open event. "Set Date
and Location" has unbound controls that call for date from
fields in the the crosstab query that drives the graph.

It's not a horrible problem and as I said, I have a
workaround, but I'd like to know what's happening.

I would kind like to know what's happening too ;-)

It really sound like the report's record source query is
running before the popup form is opened OR the form is not
being opened in Dialog mode (to force the report to wait
until the form is closed or made invisible).

On the other hand, I may be misunderstanding what you're
doing. You said the popup is opened from the report's Open
event, but then you said the popup form opens the report.
It doesn't make sense to me for both of those to be
happening. Maybe I'd get a clearer picture if you post back
with an outline of the sequence of what's going on. For
example, here's an outline of one way to do what I think
you're talking about:

Switchboard button click - open report
Report Open Event - open popup form in Dialog mode
(code execution pauses)
Popup - user enters values and clicks OK button to
indicate the controls are ready to use. Click
event makes popup form invisible.
Report Open event - code execution resumes
Report runs normally
Report Close event - Closes popup form.
Switchboard - waits for something else to do
--
Marsh
MVP [MS Access]


 
S

Susy

Marsh:
I hope I didn't put this off too long.

The outline you sent is EXACTLY what I was doing for each
form and report. But I had that pesky message the first
time the popup ran (and only once). So I tricked it by
having the popup in the main menu (startup) open event,
instructed the user to click ok, then opened the main menu
which contains all the buttons. There had to be an
actual "OK" click or the user got the "enter parameter"
message.

ANYWAY, I got tired of all that and approached the problem
differently. I now have the former-popup form as a button
on the main menu (it's no longer a popup). Now it contains
all my other buttons (for that location) right next to the
user input controls. Very handy for the user, esp. since I
made the well dropdown a listbox (I had all that room on
the maximized form). Haven't had that pesky message since.

Thanks for your help. I learned a lot dealing with this.
Susy

-----Original Message-----
Marsh:
The pop-up dialog box is always in the open event. It
opens first, waits for user selections, then opens the
report or data-entry form. The "enter parameter value"
message occurs only once each session. After the user has
entered something into the dialog box, the message never
recurs.

I didn't mention that I have a Main Menu with all the
forms and reports on buttons. Does that make a difference?
For instance, the user clicks on "Graph Data," which
brings up the "Graph" report, with the pop-up dialog
box "Set Date and Location" in the open event. "Set Date
and Location" has unbound controls that call for date from
fields in the the crosstab query that drives the graph.

It's not a horrible problem and as I said, I have a
workaround, but I'd like to know what's happening.

I would kind like to know what's happening too ;-)

It really sound like the report's record source query is
running before the popup form is opened OR the form is not
being opened in Dialog mode (to force the report to wait
until the form is closed or made invisible).

On the other hand, I may be misunderstanding what you're
doing. You said the popup is opened from the report's Open
event, but then you said the popup form opens the report.
It doesn't make sense to me for both of those to be
happening. Maybe I'd get a clearer picture if you post back
with an outline of the sequence of what's going on. For
example, here's an outline of one way to do what I think
you're talking about:

Switchboard button click - open report
Report Open Event - open popup form in Dialog mode
(code execution pauses)
Popup - user enters values and clicks OK button to
indicate the controls are ready to use. Click
event makes popup form invisible.
Report Open event - code execution resumes
Report runs normally
Report Close event - Closes popup form.
Switchboard - waits for something else to do
--
Marsh
MVP [MS Access]



.
 
M

Marshall Barton

Susy said:
The outline you sent is EXACTLY what I was doing for each
form and report. But I had that pesky message the first
time the popup ran (and only once). So I tricked it by
having the popup in the main menu (startup) open event,
instructed the user to click ok, then opened the main menu
which contains all the buttons. There had to be an
actual "OK" click or the user got the "enter parameter"
message.

ANYWAY, I got tired of all that and approached the problem
differently. I now have the former-popup form as a button
on the main menu (it's no longer a popup). Now it contains
all my other buttons (for that location) right next to the
user input controls. Very handy for the user, esp. since I
made the well dropdown a listbox (I had all that room on
the maximized form). Haven't had that pesky message since.

Well, even though I have no idea what was going wrong, I'm
glad to hear you got it working. Actually, what you ended
up with sounds like an overall improvement rather than just
a fix.

Way to go!
--
Marsh
MVP [MS Access]


-----Original Message-----
Marsh:
The pop-up dialog box is always in the open event. It
opens first, waits for user selections, then opens the
report or data-entry form. The "enter parameter value"
message occurs only once each session. After the user has
entered something into the dialog box, the message never
recurs.

I didn't mention that I have a Main Menu with all the
forms and reports on buttons. Does that make a difference?
For instance, the user clicks on "Graph Data," which
brings up the "Graph" report, with the pop-up dialog
box "Set Date and Location" in the open event. "Set Date
and Location" has unbound controls that call for date from
fields in the the crosstab query that drives the graph.

It's not a horrible problem and as I said, I have a
workaround, but I'd like to know what's happening.

I would kind like to know what's happening too ;-)

It really sound like the report's record source query is
running before the popup form is opened OR the form is not
being opened in Dialog mode (to force the report to wait
until the form is closed or made invisible).

On the other hand, I may be misunderstanding what you're
doing. You said the popup is opened from the report's Open
event, but then you said the popup form opens the report.
It doesn't make sense to me for both of those to be
happening. Maybe I'd get a clearer picture if you post back
with an outline of the sequence of what's going on. For
example, here's an outline of one way to do what I think
you're talking about:

Switchboard button click - open report
Report Open Event - open popup form in Dialog mode
(code execution pauses)
Popup - user enters values and clicks OK button to
indicate the controls are ready to use. Click
event makes popup form invisible.
Report Open event - code execution resumes
Report runs normally
Report Close event - Closes popup form.
Switchboard - waits for something else to do
--
Marsh
MVP [MS Access]


-----Original Message-----
Susy wrote:

I have lots of forms and reports driven by user- defined
parameters on pop-up forms. These forms use unbound
controls. In most cases, the user selects a beginning
date, and ending date, and a location, and receives a
set
of data for that range. The forms and reports all work
very well.

But when each form or report is used for the FIRST time
for each session, a dialog box called "Enter Parameter
Value" appears for each of the fields that calls for a
value (e.g., Forms!Set Date!BeginDate). We just click OK
through them to get to the pop-up.

I presume that your report's record source query's are of
the form Forms!popup.control, if so, there is something
wrong with the order in the code that opens the form and
the
report. The pop-up form should be opened before the
report
or from the report's Open event.

If I guessed wrong, please post back with more details
about
how you manage the form/report and the query's parameters.

.
 

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