other fields to find data automatically

stu_c

Registered User.
Local time
Today, 01:24
Joined
Sep 20, 2007
Messages
494
Hi all
Ill try and expain what I am trying to do

in a form I have Two fields (which are of interest):
1) EmployeesName which is a lookup from another table named

TBLEmployees that contains two Fields
EmployeesName
EmployeesNumber

2) Second Field named EmployeesNumber which currently also using a lookup from table named TBLEmployees

if possible what I want to try and do when I select EmplyeeName from the dropdown list of names I want the EmplyeeNumber to be inserted into this field automatically rather than searching through the dropdown list again is this possible?
 
SomeField = Me.MyComboBox.Column(x) Where x is the EmployeeNumber
In your query grid, the count starts at 0.

HTH
 
In the AfterUpdate event where you select the employer name.
 
Hi guys
it doesnt seem to be working :(

is it posisble to have a normal text box for the employee number and copy the information from colum two in the Emplyers name dropdown list?
 
anyone able to help? still struggling
 
Hi guys
it doesnt seem to be working :(

Is it working or not? You should explain precisely what you have tried and then we can take it from there.

is it posisble to have a normal text box for the employee number and copy the information from colum two in the Emplyers name dropdown list?

Yes, but I would achieve this via the AfterUpdate event of the ComboBox control. If you must do it this way then all that is required is entering an expression in the Contol Source of the TextBox control. The expression is as per the previous posting above

Code:
=[MyComboBox].[Column](1)

Remember, column counting starts at zero.

Steve.
 

Users who are viewing this thread

Back
Top Bottom