Solved

Password Protect Access Form Control

Posted on 2012-03-28
1
689 Views
Last Modified: 2012-03-28
I'm using the following code to password protect an access control on a form. The code works well, however when a new record is added it prompts the user to enter the password to change the control. I would like users to be able to add new records without the password box popping up and requiring the user to enter the password.

Private Sub SocialWorker_GotFocus()
If InputBox("Enter Password To Transfer Veteran", "Transfer Veteran") <> "password" Then
Fname.SetFocus
SocialWorker.Locked = False
End If
0
Comment
Question by:shieldsco
1 Comment
 
LVL 119

Accepted Solution

by:
Rey Obrero earned 500 total points
ID: 37778438
try this

Private Sub SocialWorker_GotFocus()

if me.newrecord=false then

If InputBox("Enter Password To Transfer Veteran", "Transfer Veteran") <> "password" Then
Fname.SetFocus
SocialWorker.Locked = False
End If

end if
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Deploying a Microsoft Access application in a Citrix environment is not difficult but takes a few steps. However, Citrix system people are often of little help, as they typically know next to nothing about Access. The script provided here will take …
Technology opened people to different means of presenting information, but PowerPoint remains to be above competition. Know why PPT still works today.
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…
Learn how to create and modify your own paragraph styles in Microsoft Word. This can be helpful when wanting to make consistently referenced styles throughout a document or template.

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now