Unbound Text Boxes


G

Guest

I have a form called "Log In Sheet" the table that this form is linked to is
the tblloginsheet. One field in the sheet is [EmployeeID] it has a
relationship to my tblemployees. I want to place an unbound text box in the
"Log In Sheet" that will detect the [EmployeeID] and journal the [LastName]
for the employee under that ID and place the correct name in the unbound text
box.

Table One Table Two
tblemployee tblLoginsheet
EmployeeID = EmployeeID
Unbound = LastName (of the specified EmployeeID)

I am having difficulties in setting the criteria..

Thanks in advance
 
Ad

Advertisements

A

AlCamp

Jennifer,
A lot of different ways to do this...
If employees fill out this form often, then why not use a 2 column combo
box to enter the EmployeeID? Column 1 contains the ID, and column 2
contains the LastName.
An unbound text control with
= cboEmployeeID.Column(1)
would display the name of any employee whose ID is selected in the combo.
(combos are numbered 0,1,2,3,...etc)

If employeeID is a security issue that other employees shouldn't see,
then...
=Dlookup("[LastName]","tblEmployees", "EmployeeID =
Forms!frmYourForm!cboEmployeeID
would also display the last name.
The Dlookup is OK, but not the "preferable" solution.
hth
Al Camp
 

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