Re: Forms and Combo Boxes

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Reggie (nospam_chief_at_smittysinet.com)
Date: 06/11/04


Date: Fri, 11 Jun 2004 13:36:54 -0700

Joe, Set the After Update event of the combo to something like this. Keep
in mind the combo boxes are zero(0) based so that column 1 is actual column
0.
I'm assuming that the item is in the first column.
Private Sub MyCombo_AfterUpdate()
    Me.MyItemField = Me.MyCombo.Column(0)
    Me.MyPriceField = Me.MyCombo.Column(1)
End Sub

-- 
Reggie
----------
"Joe" <anonymous@discussions.microsoft.com> wrote in message
news:1b5df01c44fa9$07bcd660$a001280a@phx.gbl...
> Thanks for the reply.  I have it set up as you suggested
> and can understand about the computed field.  THe problem
> is when I select from the drop down list I want both the
> item I select AND the price to move to the data table.
> My price moves but the item selected does not. I have the
> combo box set to select from a table that only has two
> colums, item and price.  I want both to be entered to the
> table.
> Thanks
> Joe
> >-----Original Message-----
> >Joe,  If you want to store the value you select in your
> combobox to a field
> >in your table you need to have the combobox bound to
> that field.  To do so
> >open the form in design view.  Double-click on the
> combobox to open the
> >properties window. Select the Data tab and set the
> Control Source to the
> >field you want by selecting it from the drop down list.
> Set the rowsource
> >to your price list.  Now when you select a price from
> the list the value
> >will be store in the field you've selected as your
> control source.  As far
> >as the computed value goes, it's not advised to store a
> derived value in
> >your table's.  Simple place a control on your
> form/report to display the
> >value when you want to see it.
> >
> >-- 
> >Reggie
> >
> >----------
> >"Joe" <anonymous@discussions.microsoft.com> wrote in
> message
> >news:1afb901c44f44$cce38610$a101280a@phx.gbl...
> >> I am a beginner at Access so I don't know much.  I am
> >> trying to create a form to fill in a table so I can run
> >> queries on the information in that table.  I will be
> >> printing a report from each record. My form has a combo
> >> box that references a price list.  It also has a
> control
> >> that computes line item prices from the item found in
> the
> >> combo box.  My problem is, the data pulled from the
> list
> >> in the combo box and the computed box are not moving to
> >> the table.  Can anyone help???
> >>
> >> Thanks
> >>
> >> Joe
> >
> >
> >.
> >


Relevant Pages

  • Re: Forms and Combo Boxes
    ... Joe, If you want to store the value you select in your combobox to a field ... will be store in the field you've selected as your control source. ...
    (microsoft.public.access.forms)
  • Re: A REAL LIVE Reverse Entropy Machine-Warning
    ... Try descending the hill's steep profession and Joe will ... price you! ... Joaquim appeals the law against hers and again departs. ...
    (sci.crypt)
  • Re: Forms and Combo Boxes
    ... >Joe, Set the After Update event of the combo to something ... >> item I select AND the price to move to the data table. ... >> combobox to open the ... >> Control Source to the ...
    (microsoft.public.access.forms)
  • Re: 1979 gasoline riot
    ... it's not the same as when high price is combined with scarcity. ... Not that Joe should be happy about rising gas prices. ... Chevrolet's fleet getting better than 30 mpg on the freeway. ... for incremental changes to work they'd have had to start in ...
    (misc.transport.road)
  • Re: best roofing ice and water shield?
    ... On Apr 4, 7:44 pm, Smarty wrote: ... Certainteed and Owens Corning btands despite a very big price ... Thanks very much Joe. ... Since I have 2 old roofs being removed, and literally 20 to 30 thousand nails being removed in the process, I am also thinking that the heavier materials will also provide a little better puncture resistance if one or more nail heads are still sticking up from prior jobs. ...
    (alt.home.repair)