Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Modules / DAO / VBA / June 2005

Tip: Looking for answers? Try searching our database.

Dynamic Combo box/bound values

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Rodi - 23 Jun 2005 18:08 GMT
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
Klatuu - 23 Jun 2005 18:51 GMT
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.

> Hi,
>
[quoted text clipped - 16 lines]
> Thank you very much for your time.
> -R
Rodi - 23 Jun 2005 21:31 GMT
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

> I think your best solution is to change the combo box for the Cost to a Text
> Box.
[quoted text clipped - 26 lines]
> > Thank you very much for your time.
> > -R
Klatuu - 23 Jun 2005 21:56 GMT
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.

> Hey Klatuu,
>
[quoted text clipped - 38 lines]
> > > Thank you very much for your time.
> > > -R
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.