By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,072 Members | 1,168 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,072 IT Pros & Developers. It's quick & easy.

Password in access

P: 2
hello,
could somebody help me how to create passwords in access? I want to have a securitypassword for some forms and reports. Is that possible? and how can I do it that it doesnt show the letters but just stars for the letters? so that its not visible...
thanks very much!
Jan 30 '08 #1
Share this Question
Share on Google+
3 Replies


MindBender77
100+
P: 234
hello,
could somebody help me how to create passwords in access? I want to have a securitypassword for some forms and reports. Is that possible? and how can I do it that it doesnt show the letters but just stars for the letters? so that its not visible...
thanks very much!
you could design a small form (Modal) that would open on the OnLoad event of the main form.

In this Modal form, you could have a simple textbox and an exit button. The textbox would contain the Input Mask of "PASSWORD". This will prevent the keystrokes of the password from being displayed. Only astrisks will be visible.

If the correct password is entered the modal close allowing access to the main form. If the incorrect password is entered you could display a message like "Incorrect Password, Do you want to try again".

Hope this points you in the right direction,
JS
Jan 30 '08 #2

P: 2
you could design a small form (Modal) that would open on the OnLoad event of the main form.

In this Modal form, you could have a simple textbox and an exit button. The textbox would contain the Input Mask of "PASSWORD". This will prevent the keystrokes of the password from being displayed. Only astrisks will be visible.

If the correct password is entered the modal close allowing access to the main form. If the incorrect password is entered you could display a message like "Incorrect Password, Do you want to try again".
Thanks, I managed that it just shows asteriks, but the event thing doesn't work. So I type in Event OnLoad "MainMenu" and than it the passwordmanager should appear when I open the MainMenu right? that doesn't work so far...
An how can I tell the box which the correct password will be? Where do I type that in? And where do I type in a message like "incorrect password, do you want to try again"?
Sorry...I'm really not familiar with Access.
Thank you so much!
Jan 30 '08 #3

MindBender77
100+
P: 234
Thanks, I managed that it just shows asteriks, but the event thing doesn't work. So I type in Event OnLoad "MainMenu" and than it the passwordmanager should appear when I open the MainMenu right? that doesn't work so far...
An how can I tell the box which the correct password will be? Where do I type that in? And where do I type in a message like "incorrect password, do you want to try again"?
Sorry...I'm really not familiar with Access.
Thank you so much!
Note I notice this code will only work with a command button.

On the OnOpen event of your MainMenu, your going to need:
Expand|Select|Wrap|Line Numbers
  1. DoCmd.OpenForm "passwordmanager", acNormal
  2.  
As for the password entry on the OnClick event of a command button in the Modal form:
Expand|Select|Wrap|Line Numbers
  1. Dim msg,style,title,response
  2.  
  3. If Textbox = "yourpassword" then
  4. docmd.close
  5. else
  6. msg = "The password you entered is incorrect. Do you want to try again?"
  7. style = vbYesNo + vbExclamation + defaultbutton2
  8. title = "Incorrect Password"
  9. response = msgbox(msg,style,title)
  10. If response = vbYes then
  11. textbox.setfocus
  12. textbox = ""
  13. end if
  14. if response = vbNo
  15. docmd.quit
  16. end if
  17. end if
  18.  
Hope this helps,
JS
Jan 31 '08 #4

Post your reply

Sign in to post your reply or Sign up for a free account.