Access Question

Posted on 2011-10-02
Last Modified: 2012-08-14
The issue that I am having with the attached database is that I am trying to use a DLookup string. I am using the following string: Cost1 = DLookup ("Retail_Price", ProductsT, "Product=" & Forms![frmReceipt]![txtPurchase1]) I am getting a #name? error message when I trying to use the form.
Question by:DelphiNube
    LVL 92

    Accepted Solution

    You need this:

    =DLookUp("Retail_Price","[ProductsT]","Product='" & [Forms]![frmReceipt]![txtpurchase1] & "'")
    LVL 12

    Expert Comment

    try this:

    Cost1 = DLookup ("Retail_Price", "ProductsT", "Product=" & chr(34) & Forms![frmReceipt]![txtPurchase1]) & chr(34)

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Join & Write a Comment

    Creating and Managing Databases with phpMyAdmin in cPanel.
    This is about my first experience with programming Arduino.
    Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
    Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    23 Experts available now in Live!

    Get 1:1 Help Now