I'm trying to do a search for vehicle types. I have 4 types of vehicles in a table (1-marked car, 2-unmarked car, 3-truck, and 4-bicycle). I have a form that I'm using for the query to use for the criteria. I need for it to search all vehicles except for bicycles, or bicycles and no other type of vehicle. I set up a combo box on my form [cboVehicle]. It's an unbound combo box that I have set like a check box:
Row Source: 1;Vehicle;2;Bicycle
Row Source Type: Value List
In my query, I tried to make my criteria: IIf(([Forms]![frmVehicleMileageSearch]![cboVehicle]=1),<>4,4)
Access changes the criteria to: IIf(([Forms]![frmVehicleMileageSearch]![cboVehicle]=1),([qryVehicleMileageAll].[UnitTypeID])<>4,4)
It will find the bicycles, but when I change the combo box to 1, it doesn't find anything.