Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2004

    Unanswered: Control Source from another table

    I have a form and a textbox on it.
    The control source of the textbox I want to be based on a SELECT statement from a specific table independently from the Recordsource of the form.
    So, I've tried something like "=(SELECT Month FROM tblMonth WHERE ID=1)" into the textbox's Controlsource but I always get a #Name? error.
    Any help will be apreciated!

  2. #2
    Join Date
    Jan 2005
    United Arab Emirates
    Please have look DLookup Function in the VBA help file
    Sample code given in the help file is below
    =DLookup("[ProductName]", "Products", "[ProductID] =" _ & Forms![Order Details]!ProductID)hope this helps

Posting Permissions

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