User-defined Type Not Defined

lxh

Registered User.
Local time
Today, 22:41
Joined
Feb 26, 2004
Messages
43
Hi

I'm a getting a 'User-defined Type Not Defined' Error in the following code snip:

Code:
HideStartupForm_Err:
    Const conPropertyNotFound = 3270
    If Err = conPropertyNotFound Then
        Dim db As DAO.Database ' DAO <---- HERE IS THE ERROR
        Dim prop As Property
        Set db = CurrentDb()
        Set prop = db.CreateProperty("StartupForm", dbText, "Startup")
        db.Properties.Append prop
        Resume Next
    End If

I searched the forums and turned up the following article/Post:User-defined Type Not Defined (Thanks Mile-O-Phile and dcx693). It defines the problem exactly and suggests some solutions. But none of them work. I'm using access 2000 on XP(Home)

Has anyone else had this problem and/or know how to solve it?

Thanks
Lex
 
And you have fixed the reference? :confused:

Also, shouldn't If Err = conPropertyNotFound Then be If Err.Number = conPropertyNotFound Then.
 
Re: 'User-defined Type Not Defined'

Mile-O-Phile said:
And you have fixed the reference?
Sorry, I'm not sure what you mean?

Mile-O-Phile said:
Also, shouldn't If Err = conPropertyNotFound Then be If Err.Number = conPropertyNotFound Then.

Yep - That does it - thanks, been looking at it far too long with out a coffee!

Many Thanks
Lex
 
lxh said:
Sorry, I'm not sure what you mean?

You've set a reference to Microsoft DAO 3.5 Library?
 
Re: User-defined type not defined

Mile-O-Phile said:
You've set a reference to Microsoft DAO 3.5 Library?

Oh I see - sorry bit of a newbie, I set the reference to
Microsoft DAO 3.6 Library. - It does work work noe thanks
Lex
 

Users who are viewing this thread

Back
Top Bottom