Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Combo Box teaser!

Status
Not open for further replies.

rookery

Programmer
Apr 4, 2002
384
GB
I have an unbound combo box based on a query containing 3 fields:
1) Company Name
2) CustID
3) Category1

All the fields are ticked to show in the query. The Category1 field has criteria looking at the SysParams table. This value will always remain the same for each record. I make this my bound field. I set the column widths property to 5cm, 0cm, 0cm respectively so that only Comapny Name is displayed. However when I try to select an entry all it ever displays is the first entry in the drop-down list.

If however I make my bound column the second field - CustID - then it works perfectly and I can select different company names. Can you not bind a combo box to the field that contains the criteria in a query?
 
I think its because the Category1 field is always the same - when you choose an item from the drop down box, it makes the value of the dropdown box the value of the bound column, and because the bound column is always the same, it chooses the first value.

The only way to solve this is to change the bound field, as you have done!

HTH

Mincefish
 
Cheers fish for your reply. I have come to the same conclusion as yourself which isnt entirely what I was expecting. I was always under the impression that the bound column would just return a value and that it wasnt actually used by Access in anyway, for example, during selection. Have a good weekend!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top