I am looking for help with a vba connection for Sage 50. There are 3 different companies that have different directory paths for the driver SageLine50v20. I can connect normally through the ODBC by changing the path manually for each company but I have been unable to get this working in Access VBA.
I have tried the following connection string with no luck
stConnect = "ODBC;DRIVER=SageLine50v20" & ";UID=" & stUsername & ";PWD=" & stPassword & ";DIR=\\FOLDER\accounts\COMPANY.001\ACCDATA;"
I currently don't have access to this try anything else at the moment but I am looking for as many options/opinions as possible for when I do.
EDIT: Sorry that was a bit vague, I believe it was the ODBC call failed error.
If someone has a working vba example for pulling a table from sage 50 which includes the directory in the connection string that would be greatly appreciated.