hi all
I have a combo box (CmbVehicleType), in the third column I have Fuel type, Diesel, Petrol Electric etc.
I want an If query that if a car is selected it looks at column 3 on the drop down list and hides/unhides fields depending on the type, I tried the following code without any luck.
Thanks in advnace
I have a combo box (CmbVehicleType), in the third column I have Fuel type, Diesel, Petrol Electric etc.
I want an If query that if a car is selected it looks at column 3 on the drop down list and hides/unhides fields depending on the type, I tried the following code without any luck.
Code:
If Me.CmbVehicleType.[Column](3).Value = "Electric" Then
Me.LblPriceOfFuel.Visible = False
Me.ChargingLeadPresent.Visible = True
Me.BatteryServiceTimeLeft.Visible = True
Else
Me.LblPriceOfFuel.Visible = True
Me.ChargingLeadPresent.Visible = False
Me.BatteryServiceTimeLeft.Visible = False
End If
Thanks in advnace