how to reference table field NOT connected to current Form.....

D

don

its probably very very simple, and still new to vba and
dao...but cant seem to find exactly in books i have or in
help - the syntax or heirarchy for referencing field in a
table that is NOT the control source for the current form..
do i need to use object variables...define db as currentdb
()...rs as newrecordset....etc...or jsut a sytax thing..
tables!tablename!field....

thanks!!!!
Don
 
C

Cheryl Fischer

Don,

Perhaps one of the domain functions such as DLookUp() might be what you are
looking for. Check it out in VBA Help.
 
P

PC Datasheet

=DLookup("[Fieldname]","NameOfTable","<<Some expression that defines the record
you want>>")

Note: "<<Some expression that defines the record you want>>" is optional

Lookup the DLookup function in the Help file.
 

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