Solved

Password Protect Access Form Control

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

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

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

AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
My attempt to use PowerShell and other great resources found online to simplify the deployment of Office 365 ProPlus client components to any workstation that needs it, regardless of existing Office components that may be needing attention.
The view will learn how to download and install SIMTOOLS and FORMLIST into Excel, how to use SIMTOOLS to generate a Monte Carlo simulation of 30 sales calls, and how to calculate the conditional probability based on the results of the Monte Carlo …
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …

739 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