Steven Ball
Steven Ball

Reputation: 481

CurrentProject.OpenConnection Fails in MS Access 2000

I support a LOB application written in MS Access VBA with a SQL Server back end. One feature of the application is the ability to open a second instance of the application, allowing the users to view/modify two records at the same time.

The first time I open the application it connects and everything works fine. However when I attempt to open the second instance I get the following error message:

-2147467259 - Method "OpenConnection" of object _CurrentProject failed.

This is the line of code executing when the error occurs:

CurrentProject.OpenConnection strConnection

I have stepped through the code and verified that strConnection is the same connection string in both the first and second instances of the application

I'm running out of things to look for. Any ideas are greatly appreciated!

UPDATE: It appears that something is not allowing the second MSACCESS.EXE instance to use the same connection string. My connection string is below, with database and server substituted for the actual database and server.

PROVIDER=SQLOLEDB.1;INTEGRATED SECURITY=SSPI;PERSIST SECURITY INFO=FALSE;INITIAL CATALOG=database;DATA SOURCE=server

Upvotes: 0

Views: 1046

Answers (1)

ajd
ajd

Reputation: 523

Try

MultipleActiveResultSets=True 

(http://msdn.microsoft.com/en-us/library/h32h3abf(v=vs.110).aspx)

Would it be better to open a new form from the same application?

dim frm as ShowCar_Form

frm.Show

Upvotes: 0

Related Questions