Hello to all!
This is my first post on this forum and I am very inexperienced with VBA programming, and so please take it easy on me!
Situation :I have a MS Access form connected to a SQL Server database through a ODBC driver. The text boxes on the form are connected to the DB fields. I would like two of the textboxes on the form to be password protected and make encrypt/decrypt the DB fields they are linked to in the process.
Ex:
When the form opens, the text boxes have the input mask "password" and the DB fields are encrypted (let's call this the locked state). But, if you press their respective button, a prompt opens and asks for a password. If the password entered is incorrect, the popup reopens with a warning that the password entered is incorrect, however, once that password is correctly entered, the dialog is closed, the DB fields are decrypted and the input masks on the text boxes are cleared until the form is closed again (let's call this the unlocked state. Once the form is closed again, the text boxes and DB fields should be put back to the way they were before, in a "locked" state.
P.S.
- When the fields are "unlocked" they should be visible and modifiable but only until the form is closed.
- If the fields could auto "lock" after 5 minutes of inactivity that would be fantastic!
- The Form itself is already programmed to require the SQL credentials to unlock, the two fields in question here just need a bit more protection as so only a few people can access it and modify it and to prevent accidental modifications
- If it is simpler to make it so all of this happens on a seperate (let's call it "read & modify" form) then I would like to also know how to add a bouton to the main form that opens up this new form.
Thank you so much in advance to anyone and everyone that helps me with this inquiry.