Duplicate entries in Combo box

  • Thread starter Thread starter Pamela
  • Start date Start date
P

Pamela

I have cboVehicleMake on my frmVehicle which is based on tblVehicleType.
tblVehicleType has 3 fields: VehicleTypeID, VehicleMake, VehicleModel.
Because the VehicleMake field has repetitive entries (there are many models
all with the same make), my cboVehicleMake is also having duplicates. Is
there a way to filter this in my SQL further or do I have to create a whole
new tbl for just Makes? Here is my row source for cboVehicleMake:
SELECT tblVehicleType.Make FROM tblVehicleType ORDER BY tblVehicleType.Make;
Thanks so much!!
 
On Sat, 24 Jan 2009 13:20:01 -0800, Pamela

Since there is a one-to-many relationship between Makes and Models, it
is best to express that in the database as two tables.
You only denormalize if you have a good reason.

If you insist on keeping the table like it is, you can use the
Distinct keyword (or the equivalent Unique Values property) to limit
the list to unique Makes.

-Tom.
Microsoft Access MVP
 
I didn't know exactly what you meant (I'm very novice) but I was able to
search your suggestion of "Distinct" in the Windows help file and found that
all I had to do was add it to the Select at the beginning of my row source
and it worked perfectly! Thank you so much!
 
Back
Top