Excel SQL command to retrieve specific information from multiple access table

  • I have a problem with importing data from Microsoft Access to Excel with sql command. Plan to use "ADODB" to connect Excel with Access. I have a few tables in Access. I want to get the ClientDesc and ProductDesc when I input on TrackNo and with a command button to execute the function the command. How can I get all the respective/required info (ClientDesc and ProductDesc)?


    Current code in excel sheet

    Code
    1. Private Sub Search1_Click()
    2. SearchTRK (Cells(1, 2))
    3. End Sub


    Current code in excel module.


    Attached with sample.
    [ATTACH=CONFIG]72596[/ATTACH]


    Ive posted similar question in another forum, but nil response.
    https://www.mrexcel.com/forum/…ultiple-access-table.html

  • Re: Excel SQL command to retrieve specific information from multiple access table


    This link to Mike Alexander's blog shows how to do a parameter query using DAO. You may want to give this a try.


    http://datapigtechnologies.com…rameter-query-from-excel/

  • Re: Excel SQL command to retrieve specific information from multiple access table


    Found solution.