Adding to the ConnectionString - HOW ?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi everyone

I am trying to append a string to my access project's connection string.

CurrentProject.Connection.ConnectionString=
CurrentProject.Connection.ConnectionString & "Jet OLEDB:System
database=C:\workgroupInfo.mdw;"

I keep getting an error message saying: can't do this while the object is
open. I then add code to close the project's connection before appending to
its connectionstring. I still get an error message saying that the close
operation failed.

What gives?

Where in the project, and how do I append to the CurrentProject.Connection's
connectionstring?
 
AFAIK, the only way is to use a shortcut that provides the necessary
information. Once you've opened the database, it's too late.
 
Could you elaborate please? Thanks


Douglas J. Steele said:
AFAIK, the only way is to use a shortcut that provides the necessary
information. Once you've opened the database, it's too late.
 
Back
Top