I have two tables, one is "inventory" and the
other is "sale". I created form using the fields from "sale". in the
"inventory" table, I saved barcodes of all items.
Here, I want the
form to populate the "item" name and "price" of the barcode I enter in
the barcode textbox of the form. Currenty, it shows only the first
record of the item and price, but I want the item name and price of the every unique barcode I enter in the barcode control of the form. The "inventory" table contains all barcodes of all the items in store and their "item" name and "price" field. but, dlookup not looking up the whole field. its showing only the first record.
in the barcode textbox after-update, I typed the dlookup as follows:
item = dlookup("item", "inventory")
Price = dlookup("price", "inventory")
Hope any angel's gonna help me ^_^ ... thanks in advance.
Software/Hardware used:
access
ASKED:
February 24, 2012 9:40 AM
UPDATED:
February 27, 2012 7:47 PM
I believe that there is nothing wrong except you should specify the criteria for the value that you are looking for.
DLookup(“item”, “inventory” , “Criteria = n”)
So, if you are expecting to display all records DLookup will not make it.