A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

password-protected form



 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old July 30th, 2004, 06:03 AM
Sam Kuo
external usenet poster
 
Posts: n/a
Default password-protected form

Katherine wrote:
Is it possible to password protect a form rather than the
entire Database?


Gerald Stanley replied:
Something along the lines of

Private Sub Form_Open(Cancel As Integer)
Const strFormPassword As String = "Password"


If InputBox("Please Enter Password") strFormPassword Then
MsgBox "Password Incorrect", vbOKOnly
Cancel = True
End If


End Sub


I have a commond button on form1 that opens the password-protected form2. If incorrect password is entered, the code above shuts form1 which was opened originally. Can this code be altered in such way that form1 remains open if incorrect password is entered, and possibly with a pop-up message asking to try again?

Sorry that I am not code literate at all. Thanks for any help!
Sam
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Form Doesn't Go To New Record Steve New Users 15 May 16th, 2004 04:33 PM
Prevent access to macro's if sheet is password protected Frank Kabel Worksheet Functions 2 May 2nd, 2004 06:22 PM
Prevent access to macro's if sheet is password protected sonar Worksheet Functions 0 May 2nd, 2004 04:34 PM
Changing dsn connection information (Password) Mike N Worksheet Functions 2 December 3rd, 2003 08:04 PM


All times are GMT +1. The time now is 08:33 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.