Jeff C
From: RK (anonymous_at_discussions.microsoft.com)
Date: 03/20/04
- Next message: ReidarT: "sendobject"
- Previous message: Tony: "Locating a record on a subform on a tabbed form"
- Next in thread: Peter Hoyle: "Re: Jeff C"
- Reply: Peter Hoyle: "Re: Jeff C"
- Reply: Jeff Conrad: "Re: Jeff C"
- Messages sorted by: [ date ] [ thread ]
Date: Sat, 20 Mar 2004 01:16:06 -0800
Hi Jeff,
It has been almost a year. How have you been doing? Hope all is well.
I have a question.
Until recently my project has work very well. But (and that always sneaks in)
I made my application an FE/BE. Now I get an error 3219 and not sure how
to fix it. See code below:
Private Sub Form_Open(Cancel As Integer)
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.
DoCmd.OpenForm "frmPassword", acNormal, , , , acDialog
Hold = MyPassword
' 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
Any suggestions?
Thank you for your help.
- Next message: ReidarT: "sendobject"
- Previous message: Tony: "Locating a record on a subform on a tabbed form"
- Next in thread: Peter Hoyle: "Re: Jeff C"
- Reply: Peter Hoyle: "Re: Jeff C"
- Reply: Jeff Conrad: "Re: Jeff C"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|