Exiting a Form and Parameter Values (1 Viewer)

Sean Milligan

New member
Local time
Today, 04:59
Joined
May 21, 2021
Messages
1
Hello!

I have a form which is linked to a simple select query with the Where criteria is link to a drop down box which the users can see and select one of 15 options.

Within the form there is a sub form. linked to another Simple select query with the Were criteria is linked to the same drop down box as above. This works find and I am.

The Variable linked with the drop down box is called CboDashDiv

Everything work find and I'm getting all the information I need to appear in both froms.

The user has the ability to reselect different options and the data is refreshed. This is used by the after update, is re runs the 2 queries. In VBA

My issue is when I got to exit the form, I'm prompted twice to input the CboDashDiv parameter. Its like its trying to re-run the quire even though I've quit the form.

any suggestions of why I may be getting the prompted, even though I'm quitting the form?
 

conception_native_0123

Well-known member
Local time
Yesterday, 22:59
Joined
Mar 13, 2021
Messages
1,097
you will get more detailed answers from others here, but I happen to know that there could be a million causes for this. You might get this again too....can you upload a file with just the form and query in it so others can see what you have?
 

NauticalGent

CopyPaster of the First Order
Local time
Yesterday, 23:59
Joined
Apr 27, 2015
Messages
4,067
Have you considered linking the Main and Sub forms with master and child linked fields - as Pat Hartman would say "The Access Way"?

This may not fix your parameter problem (it WOULD reduce it to one), but it is a better design.
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 11:59
Joined
May 7, 2009
Messages
13,784
another area to check is the form itself and the subform.
somehow the "controlsource" of one of your textbox is missing (the parameter prompt you are getting).
 

Pat Hartman

Super Moderator
Staff member
Local time
Yesterday, 23:59
Joined
Feb 19, 2002
Messages
32,908
We'd need to see the code. Sounds like a timing issue. The form is being closed before the AfterUpdate event runs.

You can validate this by putting message boxes in the Close, BeforeUpdate, and AfterUpdate events so you can track when the prompt happens.
 

Users who are viewing this thread

Top Bottom