Please Help!? new User

G

Guest

I have succesfully used microsofts code to password protect a form, but when
applied to my own database I get a compile error for the type Database!!
Coding Line is:

Dim db As DataBase

From (http:/support.microsoft.com/default.aspx?scid=kb;en-us;179371)

Error is:

Compile Error:
User-defined type not defined

Surely the database type isn't user defined. PLEASE Help!
 
G

Guest

You have a missing or undefined reference. In the VBA Editor,
Tools->References
If you see one that says "Missing", you need to reestablish the reference.
If none are missing, then you need to add it. Because this happens trying to
dim a database object, it is probably the dao library you are missing.
 
G

Guest

Right you are just re-checked DAO Object Libray. Excellent Thanx
I do have another Compile error now!

If rs.NoMatch Then

Method or Data Member not found (.NoMatch)
Can u help?
 
G

Guest

This is different. It has to do with how the recordset is defined. I think
you need to identify it as a dynaset recordset type:
Set myset = mydb.OpenRecordset("Objects to Copy", dbOpenDynaset)
 

Ask a Question

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. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top