FileSaveAs MS Project to MS Access

S

Ski

I am trying to save a MS Project File to MS Access based on user input,
thus i can't specify an exact path. I need to save the data from
Project to Access (using FileSaveAs), then create a query and paste to
Excel (using an ADO connection). Here is the piece of code that does
not work. Thanks in advance:

'FileSaveAs is a problem, I get a run-time error 1101 - Value is not
Valid
FileSaveAs Name:="<" & AccessFName & "<\" & ProjectFName,
FormatID:="MSProject.MDB8"

FileExit (pjDoNotSave)
'Connect to DB
Dim ConnDB As ADODB.Connection
Dim rstDB As ADODB.Recordset
Dim strSQL As String
Dim strSQL2 As String
Set ConnDB = New ADODB.Connection
Set rstDB = New ADODB.Recordset
ConnDB.Provider = "Microsoft.Jet.OLEDB.4.0;"

'The ConnectionString is a problem, it only wants to read a path, not
the string i pass to it
ConnDB.ConnectionString = "Data Source=AccessFName"



The rest of the code works fine. just need to work this out so i can
accept any user's input.
Thanks.
 
T

Tom Ogilvy

"Data Source=" & AccessFName

would be my guess for number 2.


I have never seen anthing like this:
FileSaveAs Name:="<" & AccessFName & "<\" & ProjectFName,
FormatID:="MSProject.MDB8"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top