JaineyBlue
Technical User
I inherited a vehicle tracking dB and trying to make some updates. Have a 'Tbl-Types' which lists vehicle, equipment and trailer types, as well as chassis types (Field1 combobox has 'A','V','E','T' choices). I want the vehicle form to autofill a fleet plan code (VWOCode) for each unit. Form currently has two fields VehicleCode and Chassis_Type which pull from the same field 'ComponentType' in Tbl-Types. There is no fleet plan code for chassis types because if a vehicle is a utility truck on a pickup truck body it needs to be included in a utility truck fleet plan, not pickup trucks. Current code is
VWOCode = DLookup("VWOCode","Tbl-Types","ComponentType='" & VehicleCode & "'")
Works wherever the vehicle type is different than the chassis type but if they are the same (eg a pickup truck that is just a pickup truck) it is pulling the empty VWOCode in the chassis record. How can I restrict the results to Types V,E,T only?
VWOCode = DLookup("VWOCode","Tbl-Types","ComponentType='" & VehicleCode & "'")
Works wherever the vehicle type is different than the chassis type but if they are the same (eg a pickup truck that is just a pickup truck) it is pulling the empty VWOCode in the chassis record. How can I restrict the results to Types V,E,T only?