Jeff C

Tech-Archive recommends: Speed Up your PC by fixing your registry

From: RK (anonymous_at_discussions.microsoft.com)
Date: 03/20/04


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.



Relevant Pages

  • Re: Loop through Row Range, Excel 2000, 2003
    ... Dim cell As Range, cell1 As Range ... Then Exit Sub ...
    (microsoft.public.excel.programming)
  • Re: Do Menu Item
    ... Thanks, Kenny G ... > Dim c As Object ... > the yes/no msgbox event and route appropriately. ... I've also added a few "Exit Sub" statements and added ...
    (microsoft.public.access.formscoding)
  • RE: New to userforms - can you help with this code?
    ... although i will look like a number in the textbox. ... if number entered is found through column A of DATA worksheet, ... Dim iRow As Integer ... Exit Sub ...
    (microsoft.public.excel.programming)
  • Problem moving mail
    ... Dim bccstring As String 'String for email adresses from paxus ... Dim icount As Integer 'Private counter ... If bExternal = False Then Exit Sub ... 'If so go get the recipients from the routine ...
    (microsoft.public.outlook.program_vba)
  • Re: Loop through Row Range, Excel 2000, 2003
    ... If Application.CountBlank= 3 Then Exit Sub ... Dim cell as Range, cell1 as Range ... msg= "ERROR Description is empty" ...
    (microsoft.public.excel.programming)