Exiting a Form and Parameter Values

Sean Milligan

New member
Local time
Today, 21:09
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?
 
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?
 
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.
 
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).
 
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

Back
Top Bottom