access autofill

  • Thread starter Thread starter Brandy Barrs
  • Start date Start date
B

Brandy Barrs

I have been trying to write a code to autofill information
from an inventory table to fill in the product description
and the number in stock when you choose the correct item
code. Could someone give me some advice on how to get
this code to work upon exit of that particular field.

Thank you for your time and effort.

Brandy Barrs
 
I am only guessing since you did not provide enough information, but it
sounds like you need to spilt the table to normalize it and then link them
back together. If you can explain exactly what you are trying to do maybe
we can help.

Also take a look at the sample database that came with the program, they
may help.
 
Hi,

I'm not sure if i understand your question completly, but i presume that you
have a form where you select an item from the inventory table through a
pulldown list and want the description and number in stock shown next to it.

If so try the =DLookup("Description","tblProducts","ItemCode=" &
Me![ItemCode]) and =DCount() functions for the "description" and "number
instock" fields textbox values.
I don't understand that the "number instock" field should be looked-up, if
you are filling an inventory table (usually you assign the number in stock
at this level). Describe your tables and relations and what you want to see
on your form after you select an item from a Product listbox.

There are many other ways (too improve performance), but if you are not
familiar with VB then this is a start.

Hope it will get you goin!

Sid.
 
Back
Top