- If you ask ELookup() to concatenate several (not memo) fields, and more than 255 characters are returned, you strike this Access bug: Concatenated fields yield garbage in recordset. DLookup() can call the expression service to resolve an argument such as: DLookup('Surname', 'Clients', 'ClientID =.
- Friday, 29 July 2011. The DLookUp function allows the Access Developer to look up the value of a field from a table other than the form's actual Record Source. It is often used as a function in a Calculated Text Box Control (see previous post for more information about Calculated Controls ). So applied to our scenario.
- Is it possible to return multiple values with one dlookup statement? AccessForums.net is a forum dedicated to Microsoft Access, if you want to ask any Access related questions or help other members out, please join our community, the registration is free and takes only one minute.
- Home Newsgroups > Microsoft Access > Microsoft Access Macros > Dlookup using Multiple fields from a table Discussion in 'Microsoft Access Macros' started by chinaboy992, Feb 29, 2004.
![Microsoft Access Dlookup Multiple Values Microsoft Access Dlookup Multiple Values](/uploads/1/2/6/1/126156132/394943669.jpg)
1 Answer
DLookup
to return more than one value. MID
s into a Recordset
, loop through them and append them to Me!MID
:Microsoft Access Dlookup Multiple Criteria
DAO works there as well, you just need a reference to
Microsoft DAO x.x Object Library
.Not the answer you're looking for? Browse other questions tagged ms-accessvbaaccess-vba or ask your own question.
In Access desktop databases you can use the DLookup function to get the value of a particular field from a specified set of records (a domain). Use the DLookup function in a Visual Basic for Applications (VBA) module, a macro, a query expression, or a calculated control on a form or report.
You can use the DLookup function to display the value of a field that isn't in the record source for your form or report. For example, suppose you have a form based on an Order Details table. The form displays the OrderID, ProductID, UnitPrice, Quantity, and Discount fields. However, the ProductName field is in another table, the Products table. You could use the DLookup function in a calculated control to display the ProductName on the same form.
Syntax
DLookup(expr, domain [, criteria] )