OK, that makes more sense.
All you need to do is when you pick what data to show in your combobox,
include both the ingredient number and the ingredient name. You can hide the
number by shrinking it's field width to 0.
Then make the control source of your text box
=<YOUR_COMBO_BOX_NAME>.column(#) where # is the column number of your item
number from the combo box. If you put it in first it will be column(0) if
you put it in second it will be column(1).
"Lisa" wrote:
> I have all my ingredients in a table with 3 fields auto number, ingredients
> and item number.
> On the form I want the user to select an ingredient and the item number auto
> populates itself. for example. in the table auto number 2 is bacon with an
> item number 9999.
> on the form if the user selects bacon in the text field for item number 9999
> will auto insert itself
> --
> Lisa S.
>
>
> "Lance" wrote:
>
> > You have an item number field already and you want to generate another one?
> > Also, if a new item number is generated every time a user selects an
> > ingredient it's going to make that item number field useless.
> >
> > Or is your question how to populate a textbox with the already assigned item
> > number for the ingredient selected?
> >
> > "Lisa" wrote:
> >
> > > I have a from that users can inout ingredients for recipes. I want the user
> > > to pick an ingredient from a drop down(which is already working). I also have
> > > a field that has an item number. I want the item number to auto generate base
> > > on the ingredient selected from the drop down.
> > >
> > > --
> > > Lisa S.
|