Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2010
    Posts
    2

    Unanswered: Need help with Combo Box and different access DB

    I have 2 Access 2007 accdb files
    Accdb#1 is the frontend and has a Combobox on a form
    Accdb#2 is the backend database on a network share drive

    I would like the combobox to pull the info from a field in a table from accdb#2

    if i assign a SQL string to the rowsource, it reports the error: recordsource on a different database

    How do I bind the rowsource of the combo box to the accdb#2
    The combobox rowsourcetype is table/query

    I have tried presenting the combo recordset with the recordset of the database but the list comes up as empty.

    I can populate using code (do while not rs.eof) which is what I DONT want to do as am unable to requery the combobox without removing all entries from the list and repoulating

    Pl assist

  2. #2
    Join Date
    Mar 2009
    Posts
    5,442
    Provided Answers: 14
    You can create a query in the front end and base the combo on it.
    Have a nice day!

  3. #3
    Join Date
    Oct 2010
    Posts
    2
    Can u give an example of the query.
    I have tried the query on the frontend (hardcoded), but when the form loads, gives same error about recordsource being on a different database

    SQL="select distinct KB_Table.kb_sec from KB_Table"

  4. #4
    Join Date
    Mar 2009
    Posts
    5,442
    Provided Answers: 14
    -In SQL view, the query should be something like:
    Code:
    SELECT <Column1>, <Column2>,...,<ColumnN>
    FROM <TableName>
    IN <Database path>
    [WHERE...]
    [ORDER BY...]
    - Or in Design view, open the Properties window and on the Source Database line, type the full path to the file containing the back end database (see picture).
    Attached Thumbnails Attached Thumbnails External Query.jpg  
    Have a nice day!

Posting Permissions

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