Using check box on form to not show it again using global procedur

C

Chris Freeman

I have one form that opens, and the user clicks a button to run a procedure.
During the procedure, a second opens from an update query, showing employees
with duplicate addresses. The procedure runs against multiple import files,
so it may show the form multiple times. I want to put a checkbox on the
address review form, so the user can say, "I do not want to view this form
again". How do I do so without the checkbox being part of the data structure?
I can't remember how to make it part of a global variable so it is read the
second time in an If...Then statement.

Thank you
 
F

fredg

I have one form that opens, and the user clicks a button to run a procedure.
During the procedure, a second opens from an update query, showing employees
with duplicate addresses. The procedure runs against multiple import files,
so it may show the form multiple times. I want to put a checkbox on the
address review form, so the user can say, "I do not want to view this form
again". How do I do so without the checkbox being part of the data structure?
I can't remember how to make it part of a global variable so it is read the
second time in an If...Then statement.

Thank you

The Northwind Sample database that ships with Access has a StartUp
form with a "do not show again" check box. See how they did it.
 
M

Mr B

Chirs,

You can define a global variable as a Boolean type. Then you would check
this global variable just prior to the opening of the second form. If the
variable would be set to a status based on the status of your check box on
the form.

When your first form opens, you would set the variable to the status that
would cause cause the second form to open. If the user checks the check box,
then you would have your code in the After Update event of the check box to
set the variable to a status that would cause the second form to not be
displayed the next time. If the user did not change the check box the first
time, then the second form would be shown again the next time.

With this method, there is no option for resetting the variable to again
show the second form, however the entire process would be repeated the next
the first form is opened.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top