excelaudio
New Member
- Joined
- Nov 4, 2015
- Messages
- 8
I have a spreadsheet that is used by different users. The spreadsheet defaults to the user's desktop folder when pulling from an Access database. My connections get updated appropriately with the VBA code I inherited, but it doesn't update the user's profile in the following code:
Note: this is the code in one of the 4 connections in the command text box:
I need the FROM "username" to automatically read the user's profile instead of it being hard coded.
Thanks for any help you can provide as I have googled everything under the sun and tinkered around with no success.
Note: this is the code in one of the 4 connections in the command text box:
Code:
SELECT qry_Contracts.Contract, qry_Contracts.LOB,qry_Contracts.State,qry_Contracts.Region,qry_Contracts.Membership,qry_Contracts.DEN
FROM 'c:\users\"username"\desktop\Daily Model Import Folder\Out of Compliance Database.accb'.qry_Contracts qry_Contracts
ORDER BY qry_Contracts.Contract
I need the FROM "username" to automatically read the user's profile instead of it being hard coded.
Thanks for any help you can provide as I have googled everything under the sun and tinkered around with no success.