DLookUp or SELECT

A

alhotch

I have a table of EMPLOYESS (tblEmployees). Fields are EmployeeID; FirstName;
LastName. I have another table of ACTIVITIES (tblActivities). One of the
fileds in the tblActivities table is PersonID which contains the number of
the EmployeeID in the tblEmployees table.

I want the resulting "match" between the [tblActivities.PersonID] and
[tblEmployees.EmployeeID to populate a Text Box with the results of this
"equal compare" AND INCLUDE the FirstName and LastName fields.

I am lost as to how to do this.
 
S

Steve

Create a query based on TblEmployees and TblActivities. Besure that
EmployeeID in TblEmployees is joined to EmployeeID in TblActivities. Put the
following expression in the first field of the query:
EmployeeName = [FirstName] & " " & [LastName]
fill the other fields of the query with the other fields you need from the
two tables. Use this query as the recordsource of the form or report you are
working on. Set the controlsource of the textbox to EmployeeName.

Steve
(e-mail address removed)
 
A

alhotch

DONE ! ANd it now works ! The "join" aspect is what I was missing.

Thanks, Steve.

Steve said:
Create a query based on TblEmployees and TblActivities. Besure that
EmployeeID in TblEmployees is joined to EmployeeID in TblActivities. Put the
following expression in the first field of the query:
EmployeeName = [FirstName] & " " & [LastName]
fill the other fields of the query with the other fields you need from the
two tables. Use this query as the recordsource of the form or report you are
working on. Set the controlsource of the textbox to EmployeeName.

Steve
(e-mail address removed)




alhotch said:
I have a table of EMPLOYESS (tblEmployees). Fields are EmployeeID;
FirstName;
LastName. I have another table of ACTIVITIES (tblActivities). One of the
fileds in the tblActivities table is PersonID which contains the number of
the EmployeeID in the tblEmployees table.

I want the resulting "match" between the [tblActivities.PersonID] and
[tblEmployees.EmployeeID to populate a Text Box with the results of this
"equal compare" AND INCLUDE the FirstName and LastName fields.

I am lost as to how to do this.


.
 

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

Similar Threads

DLookUp 4
Data Type Conflict 7
Database/form design 1
Employee Time Tracker 2
Dlookup error 13 7
Forms and database setup 4
Outer Joins??? 1
question about running a comparison query 2

Top