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

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

Post by Susy » Thu, 29 Jan 2004 06:43:28

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

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

Post by Marshall B » Thu, 29 Jan 2004 08:04:21

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.

MVP [MS Access]


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

Post by anonymou » Thu, 29 Jan 2004 09:53:41

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

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.



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

Post by Marshall B » Thu, 29 Jan 2004 14:45:31

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
MVP [MS Access]

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

Post by Susy » Sat, 31 Jan 2004 08:09:19

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"

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.

to use. Click

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

Post by Marshall B » Sat, 31 Jan 2004 14:00:07

usy wrote:

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!
MVP [MS Access]