I apologize for the confusion. It seems that you're using Excel's Power Pivot instead of Power Query to import data from your Access database. In Power Pivot, the process for viewing the connection details and extracting the connection string is slightly different. Here's how you can do it in Power Pivot:
- **Open Power Pivot**: To access Power Pivot, go to the "Power Pivot" tab on the ribbon. Click on "Add to Data Model" in the "Tables" group, and then select "From Access" (the options might be slightly different based on your Excel version).
- **Connect to Access Database**: In the "Table Import Wizard" dialog box, browse and select your Access database file (.accdb or .mdb). Click "Next" to proceed.
- **Import Data**: In the "Select Table" step of the Table Import Wizard, choose the tables you want to import from the Access database, and click "Finish."
- **Open Power Pivot Window**: After importing the data, you should see a new "Power Pivot" tab on the ribbon. Click on "Power Pivot Window" in the "Power Pivot" tab to open the Power Pivot window.
- **View Connection Details**: In the Power Pivot window, go to the "Home" tab and click on "Existing Connections" in the "Get External Data" group.
- **View Connection Properties**: In the "Existing Connections" dialog box, select the connection that corresponds to your Access database and click "Open."
- **View Connection String**: In the "Connection Properties" dialog box, you will find the connection details, including the "Connection String" you need for your VBA code.
- **Copy the Connection String**: Click on the "Definition" tab in the "Connection Properties" dialog box. There, you should see the "Connection String" field. Click on it, and you should be able to copy the connection string to your clipboard using Ctrl+C or right-click and select "Copy."
Now you should have successfully extracted the connection string from Power Pivot. You can paste this connection string into your VBA code to establish a connection to the Access database.
Again, I apologize for the earlier confusion. If you still encounter any issues or have further questions, please feel free to ask.