commandolomo
Registered User.
- Local time
- Today, 09:08
- Joined
- Jun 11, 2004
- Messages
- 73
Hello All
I have a two tables, one a recordset (2k rows) - "Main" - and one a table of codes and names (15 rows) - Areas". Each table has a ID, which relates to the Name od an area held on the table to codes. I want to return the Name of the Area onto the query grid by looking up the ID from the Areas table - exactly the type of function Vlookup in Excel allows one to do.
I am attempting to run a query against the recordset, using a Dlookup to bring back the Name of an area - yet I am having problems. I have writtern this into a field in a Query
Expr1: DLookUp("[Area_Name]","[Areas]","[Prescirber_Mid_Code]"=[Areas]![Area_ID])
yet this does not work. I have tried other forms of syntax, but to no avail.
Is my assumption that Excel's Vlookup and Access' Dlookup do the same thing? If so, any ideas what may be wrong with my expression?
Cheers
I have a two tables, one a recordset (2k rows) - "Main" - and one a table of codes and names (15 rows) - Areas". Each table has a ID, which relates to the Name od an area held on the table to codes. I want to return the Name of the Area onto the query grid by looking up the ID from the Areas table - exactly the type of function Vlookup in Excel allows one to do.
I am attempting to run a query against the recordset, using a Dlookup to bring back the Name of an area - yet I am having problems. I have writtern this into a field in a Query
Expr1: DLookUp("[Area_Name]","[Areas]","[Prescirber_Mid_Code]"=[Areas]![Area_ID])
yet this does not work. I have tried other forms of syntax, but to no avail.
Is my assumption that Excel's Vlookup and Access' Dlookup do the same thing? If so, any ideas what may be wrong with my expression?
Cheers