Combobox not letting me chose

rhett7660

Still Learning....
Local time
Today, 11:15
Joined
Aug 25, 2005
Messages
371
Hello..

I have not run into this problem before and it has me stumped. I have a form that is based off a query...

I then tried to create a drop down box so the person can pick which vendor for this order. But it will not let me pick the vendor. I get a beep beep when I try to pick one.

I have tried to link it to a couple of different things but I keep getting the same result.

I have attached a copy of the database.
 

Attachments

Since you're identifying the vendor for an order, you want the control bound to the vendor id field in the order table, not the vendor id in the vendor table. Since it's bound to the id in the vendor table, it won't let you edit it because it's an autonumber field.
 
Hmm...

If I pull the vendorID only, how can I get the actual name in the drop down?

Also when I switched it to the vendorID from the order table it will only populate with the one vendor. How can I get it to pull from the list of vendors?

I am still getting the same type of error..... the ding ding..... Does it have anything to do with the fact my form is built off a query? or is my relationship messed up?
 
Typically I would have the row source of the combo draw from the vendor table, but the control source be the field from the order table. As to what it displays, you can hide the number and display the name if that's what you prefer. You had different spellings, so I had to change a couple of things to get it to work.
 
Could you post what you changed so I can take a look at it?
 
I certainly wouldn't call this a finished product, as all I did was play around with what you had until it worked.
 

Attachments

pBaldy..

Thank you very much.... I have looked at your code and then looked at mine.. The code looks the same:

Code:
SELECT qryVendor.VendorID, qryVendor.VendorName FROM qryVendor ORDER BY [VendorName];

I am now running into more problems... I have a feeling my design might be flawed.....

Thank you for your help very much appreciated.

R~
 
As I recall, I didn't change the row source of the query, I changed the source of the form, and the field the combo is bound to.
 
Oh... I see.. That makes more sense...... I was looking at the code... and was scratching my head thinking to myself.... "how did he get it to work"... LOL.......
 

Users who are viewing this thread

Back
Top Bottom