user-defined type

  • Thread starter Thread starter polparrot via AccessMonster.com
  • Start date Start date
P

polparrot via AccessMonster.com

I am relatively new to Access programming. I am getting the following error:

user-defined type not defined

on any code referring to DATABASE.

For example:
Function fIsRemoteTable(dbRemote As DATABASE, strTbl As String) As Boolean

the dbRemote As DATABASE portion of the code returns the error.


Any ideas on what I need to do.

Thanks in advance,
Polly
 
hi Polly,
I am relatively new to Access programming. I am getting the following error:
user-defined type not defined
on any code referring to DATABASE.
the dbRemote As DATABASE portion of the code returns the error.
Add a reference to DAO 3.6 to your application (in the VBA IDE), as DAO
is not a default reference.


mfG
--> stefan <--
 
Thanks Stefan,

I have set my references for the dao now and that part is working.

I am using the code at: http://www.mvps.org/access/tables/tbl0009.htm at
"The Access Web"

I copied and pasted this code, so I was assuming that all references in it to
Subs and Functions would be valid. I'm wondering if this error is also
related to a reference that I am not aware of.

the error is:
Compile Error
Sub or Function not defined

on the following code:

Function fGetMDBName(strIn As String) As String
'Calls GetOpenFileName dialog
Dim strFilter As String

strFilter = ahtAddFilterItem(strFilter, "Access Database(*.mdb;*.mda;*.
mde;*.mdw) ", "*.mdb; *.mda; *.mde; *.mdw")
strFilter = ahtAddFilterItem(strFilter, "All Files (*.*)", "*.*")

fGetMDBName = ahtCommonFileOpenSave(Filter:=strFilter, OpenFile:=True,
DialogTitle:=strIn, Flags:=ahtOFN_HIDEREADONLY)
End Function

It seems to be the ahtAddFilterItem that is not liked. These two lines are
the only reference in all of the code to ahtAddFilterItem.

Do you have any suggestions.
 
Stefan,

Thanks for all of your help. I now have my database running correctly.

You guys are great.

Polly
 
Back
Top