Solved

Password Protect Access Form Control

Posted on 2012-03-28
1
711 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
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.

735 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