Question Convert access 2003 to 2007 gives user-defined type error

mikos

New member
Local time
Tomorrow, 06:50
Joined
Aug 10, 2009
Messages
2
I need to convert an access 2003 mdb to 2007, but when initial form is loaded I get an error "The expression On Click you entered as the event property setting produced the following error: User-defined type not defined."
If I click a button on this main menu form to load another form, I get same error.
I have some vb code in the "on load" event, but cannot find anything in the OnClick event.
Any one had this problem or able to assist with this
 
I think you just answered your own question; Sounds like you are missing some code. If you post the db we can look into it.
 
I'm struggling to find what is missing, as it runs a treat on XP/ Access 2003. code was inherited from VB4 so not elegant. mdb attached, mainform causes error to show when loading. appreciate any assistance on this esp. if it helps to tidy the code
 

Attachments

The attached database gives these errors when I load it with A2003 and XP.

As soon as I added Microsoft DAO 3.6 Library to the references list the error went away.
 
The attached database gives these errors when I load it with A2003 and XP.

As soon as I added Microsoft DAO 3.6 Library to the references list the error went away.

And the reason would be that there are several buttons on the form that loads that have

Dim rRS As Recordset

and then

Set rRS = dbs.OpenRecordset("xxxxxxxxxxxxxx", dbOpenDynaset)

which is DAO and then of course needs a reference. Remember to also put

Dim rRS As DAO.Recordset

to make it explicit.
 

Users who are viewing this thread

Back
Top Bottom