Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2010

    Unanswered: Populate Form field with Query result from another Database

    I have a query in database 1 that creates a field called Report ID. I have a form in database 2 that has a contol box that needs to be populated from the values of Report ID in database 1. Is there anyway to have the control source equal to the results of Report ID from the query? I would prefer to not have to create a table.

  2. #2
    Join Date
    Jan 2009
    Kerala, India

    Populate Form field with Query result from another Database

    Yes you can create a Query in Database2 using ReportID of the Query as source data from database1.

    1. Create a new Query in Database2 and change it to SQL View (don't select any table for the query from the current database).
    2. Type a SQL statement like the sample given below by making approproiate changes for the Query Name, Database name and location etc.

    SELECT Query1.ReportID
    FROM Query1 IN 'C:\mdbs\Database1.mdb';
    3. Save the Query with the name you want.
    4. Open the Query in datasheet view to check whether the Data from Database1 is showing up as output.
    5. You can use the new Query as source to populate your Form.
    Last edited by apr pillai; 11-18-10 at 13:07. Reason: correcton of text (Learn MS-Access Tips & Tricks)
    Learn Advanced MS-Access Programming with sample VBA Code.

    All responses are based on Access 2003/2007

  3. #3
    Join Date
    Nov 2010
    Works great. Thank you.

Posting Permissions

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