Exiting a Form and Parameter Values (1 Viewer)

Sean Milligan

New member
Local time
Today, 03:06
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, 21:06
Joined
Mar 13, 2021
Messages
1,834
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

Ignore List Poster Boy
Local time
Yesterday, 22:06
Joined
Apr 27, 2015
Messages
6,319
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, 10:06
Joined
May 7, 2009
Messages
19,228
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, 22:06
Joined
Feb 19, 2002
Messages
43,213
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