General discussion
November 11, 2002 at 10:58 PM
dakota99

DLookup command in Access

by dakota99 . Updated 23 years, 9 months ago

I am trying to use a DLookUp command in the control source of an Access 2000 formfield. In my database:

Group=FormField trying to get from the Dlookup
Emp_Names=table that is made up of the fields “Name” and “Group”
Name=field in the Emp_Names table
QCDataEntryForm=The name of the form
Processor=FormField associated with the Tablefield “Name”

My Dlookup command entered in the control source for the “Group” field of the form:

=DLookUp(“[Group]”,”Emp_Names”,”[Name]=” & [Forms]![QCDataEntryForm]![Processor])

So when the user enters a “processor” on the QCDataEntryForm, I would like the “Group” to automatically fill in with the associated value from the Emp_Names table. The value that is displayed when I run the form is [#error]. I am not sure what to change to get the correct data. Please help.

This discussion is locked

All Comments