DLookup works with the following syntax:
=DLookup("[Field]","Location","Criteria")
FIELD is the field that you want to get information from.
LOCATION is the Table name or Query name that the field is in.
CRITERIA specifies the rules that you use to get the desired result.
I have a Contact database to log phone calls. I have a table called
tblContacts. This table stores all information about a contact. I also have a
form that I use to document the calls. On the form I have ContactName and
ContactID. ContactID is the primary key for tblContacts. When a user slects a
contact from a combo box I use DLookup to locate the contact's phone number.
It's done by:
=DLookUp("[ContactPhone]","tblContacts","[ContactID]=[Forms]![MyFormName]![ContactID]")
In other words...show me the phone number from tblContacts where the
ContactID field in the table is equal to the ContactID field on my form.
Victor Torres said:
Is that I need to create a query so if in field-b I write "c" then in another
field created inside a query like field-d show the lookup for the value "c"
that is "three". Just like the Vlookup in Excel.
:
I don't understand your question. How does this array apply to DLookup?
What are you trying to accomplish?
:
Sorry this is better...
I need help on this one... I have two tables and a Query. Example:
Table1 Table2 Query
Field-A Field-B Field-B Field-C Field-A Field-B Field-D
1 a a One 1 a
One
2 b b Two 2 b
Two
3 c c Three 3 c
Three
4 b d .... 4 b
Two
5 a e .... 5 a
One
I need to create that query... Please... help