Cannot write to .csv file from Access

B

BobW

I have two computers A and B both running Vista and Access 2007 SP-2 with
the Administrator as the user. Both are loaded with the same program which
has the following sub procedure:

Private Sub btmGo_Click()
Dim stQuery As String
Dim stFile As String

Select Case Me.option
Case 1
stQuery = "qryextract-full"
stFile = "D:\AC_Monastery\ml_usa.csv"
Case 2
stQuery = "qryextract-fo"
stFile = "D:\AC_Monastery\ml_fo.csv"
Case Else
Exit Sub
End Select
Me.txtfname = stFile
DoCmd.TransferText acExportDelim, , stQuery, stFile, True
End Sub

On executing the line "DoCmd.Transfertext acExportDelim,,stQuery, stFile,
True":
Computer A creates or overwrites if existing the appropriate .csv file (
Lets say ml_usa.csv Case1) and all is well.

Computer B returns the Error "The Microsoft Office Access database engine
cannot open or write to the file 'ml_usa.csv'. It is opened exclusively by
another user, or you need permission to view or write its data"
The file ml_usa.csv file is not opened
If I go direct to an existing file D:\AC_Monastery\ml_usa.csv in Windows
explorer I can open the file, read or write to it.

I have compared all the Access options settings in both computers and the
settings are identical. AC_Monastery is a trusted source in both computers.
HELP- what setting am I missing?
 
F

Fred

A quick way to check for one other impairment is to create a shortcut to the
file on the other computer and see if you get warning messages when you use
it.
 
B

BobW

Fred said:
A quick way to check for one other impairment is to create a shortcut to
the
file on the other computer and see if you get warning messages when you
use
it.
 

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