ComboBox and Not on list feature

B

Bobbye R

I have a table that stores all the Equipment Vehicles for a company

My table sample data
VehNo = Text (01,05,13, etc)
VehType = Number (1=Rigs, 2=Trucks etc)
VehName = Text (Canterra, Ford, Simco, etc)

On a Subform there can be 1 to 3 rigs on a job and 1-3 trucks on a job.
Even though they are in the same table I use two separate queries to display
only the rigs in a combo box and only the trucks in another as I couldn't
think of another way to be sure the form has the right vehicles in the right
section.

My problem is in using the OnNotInList feature. I use the vehno in my combo
box. I have a rigs only combo box and a truck only combo box, which is what
I want, however I need to check all of the VehNos from the table to be sure a
number is not used twice before adding it to the table.

part of my form looks like this:
Rigs Trucks
Rig1 - Vehno - VehName Truck1 - Vehno - Vehname
Rig2 - Vehno - VehName Truck2 - Vehno - Vehname
Rig3 - Vehno - VehName Truck3 - Vehno - Vehname

Hope someone can help.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top