PDA

View Full Version : Solved: Combo box query gives Text box value



ylDevo
02-02-2006, 09:46 AM
Hi all,

I have a problem that seems like it should be easy to solve, but I cannot get to the solution. My Access experience is very limited, so please bear with me.

I have a form that has multiple combo boxes. With the selection of each combo box, the values in the remaining combo boxes are narrowed based on the prior selection. Once I get to the end of those selections, I would like to update a text box with the corresponding value. The combo boxes 'write' the query, now I just need to return the result to a text box.

The combo boxes are all linked (hope that is the correct terminology) to one table: tblItems. In this table there are several criteria: Vendor, Graphic, Size, Color. Once these are selected in the combo boxes, I am looking to return the Order Number which is also in tblItems. Order Number is unique based on the other values. I have the SQL query in VBA but I don't know what to do with it now and then I don't know how to update the text box with the Order Number value.

I hope that's not too confusing. I definitely appreciate the help.

Chris

ylDevo
02-02-2006, 03:38 PM
I figured this out. It appears that the problem was with the text box control that I was trying to update. I'm not sure what happened, but it was 'bound' and therefore, I couldn't set the .value to the open recordset value that was returned from the query.

Thanks.

Imdabaum
06-20-2006, 11:34 AM
Do you think the same thing would work for a list box? My listbox is populated by a query taken from the table of Memos/notes. But when i select any of the notes, the textbox doesn't change. It only shows the first object returned by the query.

n8Mills
09-10-2006, 03:53 PM
It sure would be nice if there was some code posted here.

technocraze
12-21-2006, 07:55 AM
Have u tried to bind the fields of yr table to the controlSource and unbound yr combo box or u can try using a select stat. select fields from [tableName] where OrderNum = Combo box values. using RowSource under the combo box