Dlookup

D

Diane

In a report, I am trying to have a text box automatically fill itself by
referring to fields in a table, where TblDepartments has ID, Department No,
Name of Department.
This table is linked to TblEmployeeInfo where Department No (from
TblDepartments) is linked to ID (from TblEmployeeInfo).

I would like the Name of Department to fill in automatiacally when the
Department No is shown on report.

I have tried the following, but it shows Error.
=DLookUp("[Name of Department]","[TblDepartments]","[Department
No]=Reports![TblEmployeeInfo].[ID]")

Can anyone please help. Thanks.
 
K

Ken Snell \(MVP\)

You cannot reference or read a textbox on a report. Report controls do not
expose their values to other objects. You can reference controls on a form
or fields from a table or query.
 

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