Unnecessary Parameter Prompts on Form Open

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

Guest

About the problem:
When my form opens, parameter prompts appear, but the parameters reference
controls on the form that is the process of opening. If I skip through the
prompts, then after the form opens all the form and all references work just
fine. How can I get rid of these useless prompts?

About the form:
The form is unbound. The form has 3 combo boxes providing input to three
list boxes. The list boxes are bound to either a select query or a union
query that references the combo boxes as query criteria. If I delete the
parameters in the queries I get an error. The only code on the "form open"
event relates to hiding some misc labels on the form.

Final note
The strange thing is that this behavior appeared after I made a copy of the
DB and removed some of the references on the copy in order to see how to make
it more compatible with the access installation on another computer. This
behavior occurred in the copy, but I was surprised that it repeated in the
original file although all original references are unchanged.

Many thanks in advance for your input.
 
since you didn't post your code, i can only guess.
but i think your problem is in your list box. it wants to
be populated on open and since it's not populated untill
you run one of the queries, it starts asking for
parameters.
only guess i can make.
 
Thank you for your reply.

If my understanding is correct, then the list box tries to populate
immediately because it is a bound control but somehow this happens before the
form gets around to opening the combo boxes. If I make the listboxes
unbound, then I shouldn't have the problem, correct? Or would putting the
bound listboxes in a subform affect when they are populate vis a vis the
combo (criteria) boxes on the main form? (i'd prefer to keep them bound if I
can- BTW there really isn't any relevent code on the form itself as far as I
can tell)

Further, to help understand my current problem, I was wondering if you could
help me understand in more detail what happens in the background when a form
opens.

As I mentioned, when I first built the form there was no problem. So it
seems as if while opening the form, the sequence to open each control
previously had the combo (criteria) boxes opening first followed by the list
boxes- in which case the list boxes could find the parameters in the combo
boxes. However, since it doesn't work now, it suggests that the sequence for
opening each control on the form has changed somehow.

I have no idea if this is impression has any basis in fact, but I hope
someone can educate me.
 
Back
Top