|
security
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
asswordsWhen I run the command I get the error message "Unable to find TblPassword" Would appreciate any help_Thanks Private Sub ENTER_PG_Click() Dim stDocName As String Dim stLinkCriteria As String stDocName = "ENTER PLANNED GIVING" Dim Hold As Variant Dim tmpKey As Long Dim I As Integer Dim rs As DAO.Recordset Dim db As DAO.Database On Error GoTo Error_Handler ' Prompt the user for the Password. ' Open the table that contains the password. Set db = CurrentDb Set rs = db.OpenRecordset("tblPassword", dbOpenTable) rs.Index = "PrimaryKey" rs.Seek "=", Me.Name If rs.NoMatch Then MsgBox "Sorry cannot find password information. Try Again" Cancel = -1 Else ' Test to see if the key generated matches the key in ' the table; if there is not a match, stop the form ' from opening. If Not (rs![KeyCode] = KeyCode(CStr(Hold))) Then MsgBox "Sorry you entered the wrong password." & _ "Try again.", vbOKOnly, "Incorrect Password" Cancel = -1 End If End If rs.Close db.Close Exit Sub Error_Handler: MsgBox Err.Description, vbOKOnly, "Error #" & Err.Number Exit Sub End Sub "Roger Bell" <RogerB***@discussions.microsoft.com> wrote in message <snip>news:0518E3B9-D236-4769-833B-2DCF7845D7AA@microsoft.com... >I have written the following code to open a Form "Onclick Event procedure" > When I run the command I get the error message "Unable to find > TblPassword" > Would appreciate any help_Thanks > Private Sub ENTER_PG_Click() > > Hi Roger, Silly questions: Is TblPassword a table? If it's a query then AIUI you can't use the dbOpenTable argument. If TblPassword is a table, is it in your database or do you have a link to it? Keith. www.keithwilby.com
Access 2003 security warnings
Inner Joins Problem switching between Workgroups Warehouse personnel can't get the needed form - just the backgroun Access security question Undoing Access security Protect Access database in a Network user enviroment needed? Problem opening an Access file from my computer Create a form to fill in. |
|||||||||||||||||||||||