Field to automatically put value depending on code entered in anot

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

Guest

I have been using a invoice database to invoice my customers for a while and
now want to update it so that the product name automatically enters based on
the product number I put in another field. Example below.

Item Number field, I type in 101 and then the field of description would
automatically enter "Candy Bar" and would automatically enter the price in
the next field.

Anybody that knows hoe I would do this I would greatly appreciate the info.
Thanks
 
1st,
Try using a 3 column combobox (ex. cboItemNo) to make ItemNo selection. Limit to List
= Yes
cboItemNo Columns...
ItemNo Desc Price

As a general rule, it is not recommended that you "save" the Desc and Price values, but
just "display" them to the user. Since your capturing the ItemNo, you can always
re-derive the Desc and Price "on the fly" in any subsequent query, report, or form... due
to the relationship ItemNo has to the Desc and Price fields.
Two calculated "unbound" controls will do the trick. (combo columns are numbered 0, 1,
2, 3, etc...)
txtDesc...
= cboItemNo.Column(1)

txtPrice...
= cboItemNo.Column(2)
--
hth
Al Campagna
Candia Computer Consulting
Microsoft MVP - Candia, NH USA
http://home.comcast.net/~cccsolutions

"Find a job that you love, and you'll never work a day in your life."
 
1st,
Your post has me confoosed...
Why would entering a bar code prevent your using my suggestion? It would also seem to
me that the barcode should contain a unique value that would define the Price and Desc...
why a manual ItemNo entry at all?
What field in this scenario will be responsible for determining the Desc and Price?
Please give a bit more detail. This is definitely do-able, we just have to establish
what the setup is, and what info does what.

And, a minor point... please don't delete previous responses from your replies. That
way, everyone can see the "flow" of the problem in the last post.

--
hth
Al Campagna
Candia Computer Consulting
Microsoft MVP - Candia, NH USA
http://home.comcast.net/~cccsolutions

"Find a job that you love, and you'll never work a day in your life."
 
eprman,
In the query behind the combo, include the 3 fields you want to see. Use criteria to
deliver just the records you want, and set the sort order as needed.
In the combobox properties...
ColumnCount = 3
ColumnWidths = 1'; 2"; 1" 'adjust widths to suit...
ListWidth = 4" 'sum of all widths'
--
hth
Al Campagna
Candia Computer Consulting
Microsoft MVP - Candia, NH USA
http://home.comcast.net/~cccsolutions

"Find a job that you love, and you'll never work a day in your life."
 
Back
Top