Retrieving more than 1 field from Combo Box

wllsth

Registered User.
Local time
Today, 17:55
Joined
Sep 17, 2008
Messages
81
I have a form which has a Combo Box-Table/Query which retrieves a list of employee names (fieldname 'Employee') syntax as follows :-
SELECT [Employees Extended].ID, [Employees Extended].[Employee Name] FROM [Employees Extended];

I wish to select another field (Rate) from this file (Employees Extended) and add it in automatically after I've selected the appropriate employee record.

What's the best way to do this.

Apologies I am new to Access
 
SELECT [Employees Extended].ID, [Employees Extended].[Employee Name] ,[Employees Extended].[Rate] FROM [Employees Extended];

Change the column count to 3

Make column 1 your bound field

On the OnClick or AfterUpdate for the combo box enter me.TxtRate = Me.Combo.Column(2)

Where Column(2) = Rate.

CodeMaster::cool:
 
Did as you say got 2 columns within the combo box, and put the code in 'after update'. How do I get it to populate my field called NewRate on my display form ??
 
me.TxtRate = Me.Combo.Column(2)

make sure you hae a field in your underlying table called TxtRate..
 
Sorry about this but I'm still struggling with this problem. I attach a copy of the objects, any help would be appreciated
 

Attachments

Last edited:

Users who are viewing this thread

Back
Top Bottom