Dynamic Combo box/bound values

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I hope this will make sense. Please bear with me. :)

I have two firlds in one table, ModelMun and Cost. Cost is going to be
conditional on ModelNum. In the past in a situation like this, I've just
used two combo boxes on a form and used VBA to assign the value of Cost based
on the ModelNUm selected.

Now, however, the Cost for each ModelNum is going to be changed every so
often. What we'd like to see is a very simple form with ModelNum and Cost,
both bound to db fields, and bound to each other such that Model1 is going to
have a set value, as is Model2 and so on. I'm sorry, but I just can't figure
out how to set this up such that I can bind the values to each other
initially, then allow the user to change Cost values on the form level, and
have those changes write back to the table, while retaining the binding to
the specific ModelNum.

Thank you very much for your time.
-R
 
I think your best solution is to change the combo box for the Cost to a Text
Box.
Bind the Combo Box for the Modelnum to the Modelnum field in the table and
bind the Text Box for the Cost to the Cost field in the table.
Make the Row Source for the Combo Box your table name and the bound column
the Modelnum.
Now, when you select the Modelnum from the Combo, the Cost for that Modelnum
will show in the Text Box. If you need to change the cost, you can edit it
there.
 
Hey Klatuu,

Thanks for the input. I ended up doing what I probably should've done in
the first place; I just created a seperate table with the ModelNum and Cost
fields and linked them to the table that previously held these values, then
created a form with just those fields for manipulation. I probably should've
done this first, but for some reason, I was resistant to creating another
small table. I'f you've any input about this solution, I'd love to hear it.

Thanks as always,
Bobby Benson
 
Okay, I misread the question. I thought you had a table with only those two
fields. There is another way that may work for you. That would be to create
a totals query that has only the Modelnum and Cost fields and Group By on
both fields. Then you have a unique row for each Modelnum, Cost combination.
Then create a multi column combo box that would show both.
 
Back
Top