DLookup I Think?

pd06498

Registered User.
Local time
Tomorrow, 05:10
Joined
Dec 30, 2003
Messages
80
In my database I have a form (frmHandover) which is bound to a table. This form has text box fields including a field for EmployeeNo. I also have an unbound text box on this form into which I want to have the employees name etc added, depending on what is in the employeeNo field.

The employee details are entered onto a different form based on a different table. When the frmHandover is opened, it should show the employeeNo in its own text box, with the rank, firstname and surname concatenated in the unbound text box.

I am trying to populate the unbound field so I end up with the employee's number, rank and name concatenated.

I think I need to use DLookup, but am totally confused about using it. The fields I have for the table containing the employee details are as follows:
EmployeeNo
Rank
FirstName
Surname

Can anyone assist?
 
Is the form with the employee details still open?
If so you can fetch them direct from there using something like
Forms("formname")!ControleName

Greetz
 
Nam

No, the employees form is not still open.
 
Is the frmHandover opened from the employee form?
Or from another form the ID is located on?

If so you can use the openArgs of the Docmd.Openform statement to pass the ID and use a recordset to fetch the data you want and then put it in the unbound boxes

Greetz
 

Users who are viewing this thread

Back
Top Bottom