PC Review


Reply
Thread Tools Rate Thread

error 3219 Invalid Operation

 
 
=?Utf-8?B?UmF5?=
Guest
Posts: n/a
 
      20th Jun 2007
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
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Runtime Error 3219 - Invalid Operation =?Utf-8?B?UmVuYQ==?= Microsoft Access VBA Modules 3 4th Sep 2009 08:37 PM
Runtime Error 3219: Invalid Operation jcdyer Microsoft Access Queries 0 31st Aug 2006 11:17 PM
Re: Rs.AddNew fails with error 3219 invalid operation Dirk Goldgar Microsoft Access VBA Modules 1 15th Apr 2005 02:42 PM
Re: Help Needed:Error 3219 Invalid Operation When running a query Jim Evans Microsoft Access Form Coding 1 16th Sep 2004 02:23 AM
Help Needed:Error 3219 Invalid Operation When running a query Jim Evans Microsoft Access Form Coding 10 14th Sep 2004 03:12 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:58 AM.