Combo Box Fill in

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi Everyone
How can I automaticaly fill in combo box based on another combo box on the
same form. I have a table with drivers and a column for preferred vehicle.
In my calendar I choose a driver in combo box1 and I'd like to automacicaly
fill in combo box2 with their preffered vehicle. I need a combo box beacouse
I sometime need a different vehicle.

Thanks
Barb
 
Hi Ken
Thanks for pointing me in this direction. Unfortunetly I don't fully
understand the code.
I hate to ask for a hand out but could you please help me more.
Here is my combo1 row source
SELECT tblDrivers.DriverId, tblDrivers.DefaultVehicleID, [FirstName] & " " &
[LastName] AS Driver
FROM tblDrivers
WHERE (((tblDrivers.LastDay)>Date()) AND
((tblDrivers.Division)=[Forms]![frmDivision]![txtDivision]))
ORDER BY [FirstName] & " " & [LastName];

and my combo2 row source
SELECT tblVehicles.VIN, tblVehicles.CTMVehicleID, tblVehicles.Division
FROM tblVehicles
WHERE (((tblVehicles.Division)=[Forms]![frmDivision]![txtDivision]));

thanks
Barb
 
Hi Ken
Please disregard. I got it. I used a Column property from combo1 to populate
combo 2. What I did not know was that it was 0 based so my column 2 is
actually column1.
here is a code I put in After update of combo1
Me.cmbVIN = Me.DriverId.Column(1)

thanks
Barb
 
Back
Top