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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Restricted Forms
I am using Access 2000
I created a Db that is used by several departments. (Trying to go paperless you know.) Now I would like to know if I can restrict form entry to a particular person. I think this would take a password or something but have no clue even if Access can do this. I am not familiar with writing programming code. Can this be done? If so how? Aurora |
#2
|
|||
|
|||
Restricted Forms
There are all sorts of options. Look up "permissions"
and "user level security" in Help. For a sort of casual security, you could do something like this: Call the form you want to restrict to one user frmSecretForm. Make a new form (frmPassword). Set its Pop-Up and Modal properties to Yes. Place an unbound text box (txtPassword) on the form. Place a command button on the form, with the following code in the Click event: If Me.txtPassword = "SecretWord" Then DoCmd.OpenForm "frmSecretForm" Else MsgBox "Invalid password",_ vbInformation, "Password Error" DoCmd.Close acForm, "frmSecretForm" End If DoCmd.Close Underscore in the above code means no line break. Just leave it out when you write the code. You could also put a button on frmPassword with the code: DoCmd.Close acForm, "frmSecretForm" DoCmd.Close This will close the form without error messages should somebody click by mistake on the button to open frmSecretForm. Finally, at the command button that opens frmSecretForm, place the following code: Dim stDocName As String Dim stLinkCriteria As String stDocName = "frmSecretForm" DoCmd.OpenForm stDocName, , , stLinkCriteria The code above uses "SecretWord" as the password, so change it accordingly. Same for the form names, of course. This method is not really all that secure, since users who know what they are doing could sneak in and get the password from the code. -----Original Message----- I am using Access 2000 I created a Db that is used by several departments. (Trying to go paperless you know.) Now I would like to know if I can restrict form entry to a particular person. I think this would take a password or something but have no clue even if Access can do this. I am not familiar with writing programming code. Can this be done? If so how? Aurora . |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
datasheet forms open in form mode from the Switchboard | Paul James | Using Forms | 5 | July 13th, 2004 06:51 AM |
Protected forms | Angela | General Discussion | 2 | July 8th, 2004 06:41 PM |
Data entry forms and/or subforms | Hugh Crean | Using Forms | 2 | July 8th, 2004 05:56 PM |
Word Forms? | CEVisker | New Users | 4 | June 21st, 2004 01:25 AM |
Forms Check Box not working | DLLower | General Discussion | 2 | June 17th, 2004 09:34 PM |