D
Dustin Ventin
I have an Access program that I'm upgrading from using an Access mde
front-end and mdb back-end to using a SQL Server back-end. This database
includes the tables and information neccisary to hold Microsoft Project
files, and I was able to write extensive VBA to manipulate and use the data
using some simple code, such as the following to open the MSP file:
ProjApp.FileOpen Name:=strPath, ReadOnly:=False, FormatID:="MSProject.MDB8"
Now, of course, the path "strPath" no longer works, because what's required
is a connection the the SQL Server. I figured this should be simple, and
used the macro VBA from Project of opening a project stored in my SQL Server
database. The code that came back was:
ProjApp.FileOpen Name:="<{SQL Server}>\Project1", ReadOnly:=False,
UserId:="sa", DatabasePassWord:="xyzzy49", FormatID:="MSProject.ODBC"
When I run this from Access, a box comes up from Microsoft Project and asks
for the name of the server. The problem is
1) When I type in the name of the server, it errors out and says "Project
cannot open the file."
2) I don't want to prompt the user, I want to replace the "{SQL Server}" bit
with the connection string, if I could.
Does anyone have any experience with this, or ideas on how to make this work?
Thank you,
Dustin
front-end and mdb back-end to using a SQL Server back-end. This database
includes the tables and information neccisary to hold Microsoft Project
files, and I was able to write extensive VBA to manipulate and use the data
using some simple code, such as the following to open the MSP file:
ProjApp.FileOpen Name:=strPath, ReadOnly:=False, FormatID:="MSProject.MDB8"
Now, of course, the path "strPath" no longer works, because what's required
is a connection the the SQL Server. I figured this should be simple, and
used the macro VBA from Project of opening a project stored in my SQL Server
database. The code that came back was:
ProjApp.FileOpen Name:="<{SQL Server}>\Project1", ReadOnly:=False,
UserId:="sa", DatabasePassWord:="xyzzy49", FormatID:="MSProject.ODBC"
When I run this from Access, a box comes up from Microsoft Project and asks
for the name of the server. The problem is
1) When I type in the name of the server, it errors out and says "Project
cannot open the file."
2) I don't want to prompt the user, I want to replace the "{SQL Server}" bit
with the connection string, if I could.
Does anyone have any experience with this, or ideas on how to make this work?
Thank you,
Dustin