Combo box lookup

Grezzo

Registered User.
Local time
Today, 08:04
Joined
Feb 28, 2005
Messages
13
I have a form with a combo box (unbound) that gets its values from a table.
I also have another combo box which is supposed to get its values from a query:

SELECT Vehicle.Registration, Vehicle.Make FROM Vehicle WHERE (((Vehicle.Customer)=Forms![New Job]!Customer));

I have made the first combo box refresh/requery the second one onChange, but I get no options in the combo box.

I am pretty sure that the first combo box is Forms![New Job]!Customer. and there are matching values in the Vehicle.Customer field.

The database can be downloaded from:
http://www.tapestriesdirect.com/Garage.mdb (996KB)
or if you can unzip (who can't?!?)
http://www.tapestriesdirect.com/Garage.zip (86.1KB)

Cheers for any help

Graeme
 
The primary problem is that the telephone column is the bound column of the first combo, so that's the value the second combo is trying to match. Either refer to the name column specifically, or switch them around in the SQL so it's first.

BTW, I'd requery the second combo in the after update event of the first, rather than the change event. The change event happens with every keystroke, while the update event won't happen until they make their final selection.
 
Sorted

Cheer mate, thats sorted it. I thought it might be something that simple.

Thanks again
 

Users who are viewing this thread

Back
Top Bottom