vlookup?

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

Guest

i have a list of materials. what i would like is for when i type in a
specific material the price will automaticaly show in the cell next to it. i
tried vlookup but i don't know if i am putting in the right into ex.)
lookup_value= plywood ...(material)
table_array=A7:B34
col_index_num=45 ...(price)
range_lookup=false

does this look right? because it doesn't work. any ideas?


-
thanks so much
 
You need a Materials table:
TblMaterial
MaterialID
MaterialName
MaterialPrice

Next you need to build a query based on TblMaterial. Include all the fields
in the table in the query and put them in the query in the same order as in
the table. Sort Ascending on MaterialName.

Finally you need a form with a combobox and a textbox. Set the rowsource
property of the combobox as the query. Set Bound Column to 1, Column Count
to 3 and Column Widths to 0;2;0. Put thie following code in the AfterUpdate
event of the combobox:
Me!NameOfTextbox = Me!NameOfCombobox.Column(2)

When you select a Material in the combobox, the price of that material will
appear in the textbox.
 
Excel question?

This newsgroup is for Microsoft Access (a database application). If you are
using Excel, suggest you re-post the question in one of the relevant Excel
newsgroups.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top