Have this bit of code in "onload" in the opening form of an application. I want to link to an SQLServer database, but I keep getting a "Compile Error:Expected: End of statement" on the semi-colon after the Uid=nn. (I have changed the Uid, Password etc in this post. I get the same results with real names in the code.)
DoCmd.TransferDatabase acLink, "ODBC Database", _
"ODBC;Driver={SQL Server};Server=ServerNme;Database=DbNme;_"
Uid=nn;Pwd=xxxxxx",acTable,"MYSQLTABLE","MYACC ESSTABLE" _
After I get this to work I will creating a runtime verson of this ap for distribution so I need to find and log onto the database from other PC's in the domain.
Any help would be appreciated.
Thanks in advance
jpl
DoCmd.TransferDatabase acLink, "ODBC Database", _
"ODBC;Driver={SQL Server};Server=ServerNme;Database=DbNme;_"
Uid=nn;Pwd=xxxxxx",acTable,"MYSQLTABLE","MYACC ESSTABLE" _
After I get this to work I will creating a runtime verson of this ap for distribution so I need to find and log onto the database from other PC's in the domain.
Any help would be appreciated.
Thanks in advance
jpl