barcode entered, still dlookup not populating “item” and “price” in the form

5 pts.
Tags:
Microsoft Access
Microsoft Access forms
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

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Walrum
    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")
    1. The DLookup function returns a single field value based on the information specified in criteria.
    2. Although criteria is an optional argument, if you don't supply a value for criteria, the DLookup function returns a random value in the domain.
    3. If no record satisfies criteria or if domain contains no records, the DLookup function returns a Null.
    4. If more than one field meets criteria, the DLookup function returns the first occurrence
    So, if you are expecting to display all records DLookup will not make it.
    270 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following