I used the upsize wizard in Access 2010 to split my database with the table being on the SQL server. I entered this in the autoexec (was macro, I converted it)

Function autoexec()

oConn.Open "Driver={SQL Server};Server=JCPLMSQL01;Database=TestingConnection;Trusted_Connection=yes;"

    DoCmd.OpenForm "Form1", acNormal, "", "", , acNormal

    Exit Function

End Function

I don't know enough about this to know what is wrong. The error is in the oConn.Open line.


Which version of SQL server are you running on your server?
Also, you have no username or password in the connection...

It is working now. I had some permissions errors. We are using Windows authentication so I didn't think I would need the unsername and password.

Thanks for replying

Only a pleasure. Please mark this as solved, thanks. :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.18 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.