DLookup function

M

Michael

I have an MDB with my tables and then a seperate MDB with the forms,
modules, etc. I am using ADO for my database connections etc.

What I want to know is ... can I use the Dlookup function in my code? I
think not, as my tables don't actually exist in the MDB where I am coding in
VBA. Can anyone verify this for me?

Thanks
Michael
 
D

Duane Hookom

The "domain" (middle argument) of DLookup() requires a table (possibly
linked) or saved query in your current database. You could create your own
DLookupRemote() function that would do basically the same thing as DLookup()
but use ADO.
 
D

Douglas J. Steele

Presumably you've got linked tables in your front-end that point to the
actual tables in your back-end database. For all intents and purposes,
that's no different to Access than actually having the table in the same
database. (The only difference that I'm aware of is that you can't use the
Find method of a recordset with a linked table, but there are work-arounds
for that, too)
 
M

Michael

I prefer to create the remote lookup function... I don't have any linked
tables

Thanks
 
M

Michael

I don't have linked tables at all


Douglas J. Steele said:
Presumably you've got linked tables in your front-end that point to the
actual tables in your back-end database. For all intents and purposes,
that's no different to Access than actually having the table in the same
database. (The only difference that I'm aware of is that you can't use the
Find method of a recordset with a linked table, but there are work-arounds
for that, too)

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)



coding
 

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