user-defined type

  • Thread starter polparrot via AccessMonster.com
  • 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
 
S

Stefan Hoffmann

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 <--
 
P

polparrot via AccessMonster.com

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.
 
P

polparrot via AccessMonster.com

Stefan,

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

You guys are great.

Polly
 

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

Top