Automation error from Microsoft Code

Randix

Registered User.
Local time
Today, 19:05
Joined
Mar 24, 2001
Messages
56
I was interested in password protecting a form, so I went to this link...
http://support.microsoft.com/support/kb/a rticles/Q179/3/71.ASP?LN=EN-US&SD=gn&FR=0&qry=q179371&rnk=1&src=DHCS_MSPSS_gn_SRCH&SPR=ACC97

I substituted my form for the Northwind example, and I copied and pasted the code to make sure there was no typing error...when I click on my form I get notified of "Compile error...Automation error" and the line that is highlighted is "Dim rs As Recordset"

Can anyone tell me what I could have done wrong or what it means...I can't figure it out...

Here's the part that seems to be causing my problem:

Dim Hold As Variant
Dim tmpKey as Long
Dim I As Integer
Dim rs As Recordset
Dim db As Database

It's the last two lines that are creating havoc with my Sunday morning...

Thanks

[This message has been edited by Randix (edited 03-25-2001).]
 
What version of Access you are using?
It is a good idea to put what version of Access you are using in ALL your posts, as A97 and A2000 have various 'incompatibities'.
The most common one is the DAO library used in A97 which isn't by default in A2000 (it uses the ADO library). Although it is backward compatible but you have to 'tell it'.
If you are using A2000 (which I suspect you are) then open the vb window, select Tools, references and tick the DAO 3.6 box.
This should fix your problem.

HTH
 
Sigh...I'm using the 97 version...and now when i try and run it i get "Unexpected error (2121)...

[This message has been edited by Randix (edited 03-25-2001).]
 
Have you checked the references in vb like I said. Make sure none are marked as 'MISSING'. Also try compiling all your code and see if any errors are thrown up.

hth
 
Well, i checked the references and it let's me check some, but on others it says "Can't perform requested operation"; when i go to "run" it says "Unexpected error [3219]"
 

Users who are viewing this thread

Back
Top Bottom