error 3219 Invalid Operation

Discussion in 'Microsoft Access Form Coding' started by Guest, Jun 20, 2007.

  1. Guest

    Guest Guest

    I have managed to get a password function working using the code on this
    Microsoft page.

    http://support.microsoft.com/kb/209871

    My code works perfectly if I create the table tblPassword within the active
    ..mdb file.

    However, if I put the tblPassword table in another mdb and link it I get an
    Error 3219 Invalid Operation message.

    I am thinking towards the recordset part of the code which is as follows:

    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
    DoCmd.Quit

    Any help appreciated.

    Thanks.

    Ray
     
    Guest, Jun 20, 2007
    #1
    1. Advertisements

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Similar Threads
  1. Guest

    "Operation not supported in transactions" error message

    Guest, Nov 25, 2003, in forum: Microsoft Access Form Coding
    Replies:
    1
    Views:
    732
  2. jac
    Replies:
    11
    Views:
    7,022
    John Vinson
    Feb 29, 2004
  3. Guest

    Run-Time Error 3219

    Guest, Mar 16, 2004, in forum: Microsoft Access Form Coding
    Replies:
    2
    Views:
    632
    Guest
    Mar 16, 2004
  4. Jim Evans

    Help Needed:Error 3219 Invalid Operation When running a query

    Jim Evans, Sep 10, 2004, in forum: Microsoft Access Form Coding
    Replies:
    10
    Views:
    1,078
    Dirk Goldgar
    Sep 14, 2004
  5. Jim Evans

    Re: Help Needed:Error 3219 Invalid Operation When running a query

    Jim Evans, Sep 15, 2004, in forum: Microsoft Access Form Coding
    Replies:
    1
    Views:
    474
    Dirk Goldgar
    Sep 16, 2004
  6. Replies:
    3
    Views:
    359
  7. Jack

    There is an invalid use of the .dot or ! or invalid parenthses

    Jack, Jan 6, 2009, in forum: Microsoft Access Form Coding
    Replies:
    10
    Views:
    724
    Dirk Goldgar
    Jan 6, 2009
  8. Wuffles

    Split Database then error 3219

    Wuffles, Mar 26, 2010, in forum: Microsoft Access Form Coding
    Replies:
    2
    Views:
    730
    David W. Fenton
    Mar 29, 2010
Loading...