Solved

Password Protect Access Form Control

Posted on 2012-03-28
1
677 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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Outlook Free & Paid Tools
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
The viewer will learn how to simulate a series of coin tosses with the rand() function and learn how to make these “tosses” depend on a predetermined probability. Flipping Coins in Excel: Enter =RAND() into cell A2: Recalculate the random variable…

705 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

12 Experts available now in Live!

Get 1:1 Help Now