Checkbox to Permanently Close Form

Heatshiver

Registered User.
Local time
Tomorrow, 01:50
Joined
Dec 23, 2011
Messages
263
I have a simple DB that needs to be distributed to a few computers. I know that they will have to "enable content" the first time they use the DB.

I would like to make an initial form where there is a checkbox that when checked will ensure that the initial form no longer appears.

The initial form is just some instructions to explain how to enable the content the first time. The checkbox would set respective parameters to not only allow this first form to never show again, but to make the 2nd form display as the 1st form when opening the DB from then on.

I am unsure how to make a checkbox (or other viable switch) by macro, in code, or otherwise do the above.

Please help.
 
OK, I would do this by making what you refer to as your second form to be your first, and would use some code on the On Open event to check to see if needs to display the initial form or not.

Without going into too much coding detail here (although I will if you need), I think you need the following:

Some way of telling if a User has enabled the content. Best way of doing this, have a table with usernames in it (the username being the login they use - I assume the users have to log in to their PC?) and a yes / no field which shows if they have enabled the content or not.

So, when you database opens up, it will load your 'second' form and in the On Open event, you will need some VBA which will:

Capture the user login

Check if that user has enabled content

If not, hide the form and open your 'initial' form to allow them to do so (then have a button on this form which will close the form and unhide the previous form)

If they have already enabled content, then essentially do nothing.

Use Environ("username") to capture their login username and you can the do a DLookup on you user table to check whether the enabled field is True or False.

If you need any more help, let me know.
 
The users and enabling content isn't really important to me.

I want them to have the option to turn off the initial form or leave it up if they so choose. I just need them to have this initial form so they can understand how to "enable content".

Other than that, it doesn't matter if they have it appear first every time if they decide not to check off the box.

I do need help coding something for this.
 

Users who are viewing this thread

Back
Top Bottom