[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Password protect a Form

Posted on 2008-06-20
16
Medium Priority
?
2,614 Views
Last Modified: 2010-05-18
I've found a few questions where this has been discussed but the solutions are a little more intense than what I'm looking for. I've got a form in an Access 2003 .mdb that I want to password protect. This form allows data to be edited in a table that I want to remain off limits. I don't want to use user permissions, etc - B/c they are a nightmare to understand and implement and a high level security is not a main focus. I'm not worried about someone stealing the data, I'm worried about someone that doesn't know what they're doing pressing buttons.

What I want is this:

User clicks a button, prompt/msgbox is displayed that asks for a password, user enters password, form is opened. Incorrect or no password entered = form doesn't open, msgbox displays "incorrect password".

I'm not really looking for anything over-the-top with user names, etc.

Help is appreciated!! Thanks!!
0
Comment
Question by:Haze0830
  • 8
  • 5
  • 2
  • +1
16 Comments
 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 1600 total points
ID: 21834066
look here

How to Create a Password Protected Form or Report
http://support.microsoft.com/?kbid=209871
0
 
LVL 75
ID: 21834078
Private Sub Form_Open(Cancel As Integer)

  IF InputBox ("Enter Password") <> = "YourHardCodedPassword" Then
       Msgbox "Sorry, get lost dude"
       Cancel = True
  End If

End Sub

   
0
 
LVL 2

Author Comment

by:Haze0830
ID: 21855811
capricorn -

Tried that one. Can't get it to work for some reason.
0
Granular recovery for Microsoft Exchange

With Veeam Explorer for Microsoft Exchange you can choose the Exchange Servers and restore points you’re interested in, and Veeam Explorer will present the contents of those mailbox stores for browsing, searching and exporting.

 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 21855884
post the codes you are using, so we can find the reason why it is not working

or better attach the db with the form. check Attach File below
0
 
LVL 2

Author Comment

by:Haze0830
ID: 21856322
DataBase -

I get a syntax error on the IF line.
0
 
LVL 2

Author Comment

by:Haze0830
ID: 21856355
Capricorn -

I'm using the exact codes it's giving, just modifying DB object names where applicable.
0
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 21856366
what IF line? where is the IF line?
0
 
LVL 2

Author Comment

by:Haze0830
ID: 21856404
From his original post:

" IF InputBox ("Enter Password") <> = "YourHardCodedPassword" Then "
0
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 21856411
Haze0830,

post the codes here and indicate where you are getting the error. and what is the error you are getting.
0
 
LVL 2

Author Comment

by:Haze0830
ID: 21856435
will do
0
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 21856450
i did not post this
<IF InputBox ("Enter Password") <> = "YourHardCodedPassword" Then>

the correct syntax is

IF InputBox ("Enter Password") <>  "YourHardCodedPassword" Then

0
 
LVL 75

Assisted Solution

by:DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform) earned 400 total points
ID: 21856883
Sorry about the TYPO

 <> =

s/b

<>

no equals sign ...

mx
0
 
LVL 2

Author Comment

by:Haze0830
ID: 21856939
ok, i found the problem. It didn't like me leaving using a linked table for the password table. As soon as I changed that it worked fine.
0
 
LVL 2

Author Comment

by:Haze0830
ID: 21856949
I know you didn't capricorn. That's my post was directed at Database.
0
 
LVL 2

Author Comment

by:Haze0830
ID: 21859388
Both work. But I'm going to go with Capricorn's. I'll split the points in his favor. Thanks for the help.
0
 

Expert Comment

by:whitesandsbeach
ID: 22970944
I don't see how the password "PASSWORD" creates security. Anybody might use it. Please explain.
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
Windows Explorer lets you open cabinet (cab) files like any other folder. In VBA you can easily handle normal files and folders, but opening and indeed creating cabinet files takes a lot more - and that's you'll find here.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses

830 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