7 replies
by karpi
Hi,
yes it is possible.
Use the onUpdate-Event of employee_id an place the following code:
If Not IsNull(Me.employee_id) Then
a = DLookup("MyDBFieldEmployee_name", "MyEmployeeTable", "MyDBEmployeeidField=" & Me.employee_id)
End If
Pleas replace the My... with the according Field/Tablenames from your System
HTH
Karpi
by dakota99
Thanks for your help. I am having a little trouble following your example....
In your example: What does Me.employee_id stand for?
Also, there is no on update. The closest thin I found was before or after update. I tried the code in after updatewithout success.
I am a little confused...Please Help....
by karpi
OK,
the event is really "After Update". Sorry!
Here is some clarification:
MyDBFieldEmployee_name => is the Tablefield that holds the Name of the employee.
MyEmployeeTable => is the Name of the table that holds the Employee-Information.
MyDBEmployeeidField => is the tablefield that holds the employeeid
Me.employee_id => is the formfield that holds the user-entered employee-id
a => is the formfield that holds the name of the employee
This statement simply means Lookup a field (MyDBFieldEmployee_name) in a table (MyEmployeeTable) with a restriction (in the row where the employee_id is equal to the user-entered value from employee_id)
HTH
Karpi
by dakota99
by phingers
by dakota99
by dakota99
This discussion is closed to new replies.
Trending Software posts
Sort by Trending