Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2009

    Red face Unanswered: DLookup not working in Form

    Problem Definition:

    Using Access 2003

    Table Name: Upload 1
    Field in Upload 1: Product
    Common field in Upload 1: Best Buy RGM (primary key)

    Form created to input new receipts: RGM Input
    Common field in Form: Best Buy RGM (primary key)

    Table Name for data being entered by Form RGM Input: RGM Receipts

    I have a need to create two tables within this database. I receive an advanced shipping notice via an excel format that I import into table Upload 1. This table has a unique serial number field called “Best Buy RGM”. It also has a field called “Product” which is the model # of the item to be shipped.

    My second table is generated by the “RGM Input” form. This form wants the user to scan in the Best Buy RGM into the first field. Upon entering that data I want Access to automatically populate the next field called “Expected Product”. I need the lookup command to check the serial number I just entered into the Best Buy RGM field and if it’s in the Upload 1 table, I want it to populate the field called “Expected Product” in the Form “RGM Receipts”.

    I don’t want to write the product data in the new table I’m creating, just want to compare the product in my hand to the one I’m expecting to get. If it is a variance I use the form to document the discrepancy information.

    Do I use a DLookup expression and if so, where do I put it? in the Data Source for the field or in events? Nothing seems to work!

  2. #2
    Join Date
    Nov 2007
    Adelaide, South Australia
    You could use DLookup in the control source of Expected Product, but you would have to requery it after updating the Best Buy RGM field.
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!

    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  3. #3
    Join Date
    Oct 2009
    Thanks, I'll give it a try.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts