Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2007

    Question Unanswered: DLOOKUP Customer Address


    I'm looking for help. I'm generating invoices (reports) from a parameter query which uses the customers account code (which i provide) .to display all sales for that customer between a provided date range.

    This works fine but in the report header I'd like to have the report use the provided parameter "Account Code" to match up with the "Account Code" entry of my "Customers" table and display the customers name, address etc. I've a feeling dlookup can do this but damned if I can get it to work. Currently I've got this

    =DLookUp("[NAME]","Tables![CUSTOMER]","[CODE] = Queries!Bobs!ACC_CODE")

    But this, and every variation I've tried gives me an Error#
    I'm new to access, and indeed databases and I'm picking this up as I go. I'm probably made a simple mistake. To be honest I'm not even sure DLOOKUP is what I want so if their is a better way, here's what I'm trying to do:

    The query the report is based on, for testing purposes "Bobs", has a column [ACC_CODE# which is the parameter the query uses. This code matches the entry on ONE ROW of the [CODE] column in my table "CUSTOMER". Basically I want Access to look and see which [CODE] entry in "CUSTOMER" = the provided [ACC_CODE] in the query, and then display the [NAME] (Or ADDRESS, or PHONE etc.) of the corresponding row.


  2. #2
    Join Date
    May 2005
    Nevada, USA
    Provided Answers: 6
    Here's a good reference:

    However, I would think you could join the 2 tables together in your query and get the name that way. It would be much more efficient.

Posting Permissions

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