G
Gary
I have a VBA Code that works in Acc2000 and Acc2003 on XP Pro OS Sp3. I was
tesing the same code with Acc2007 with Win 7 Pro (64-bits). My Acc2003 has
Sp3 and my Acc2007 has Sp2.
This is the VBA Code that I used:
Dim FullPath As String
Dim QueryName As String
Dim filename As Variant
filename = Forms![Video Export]![Text22]
FullPath = "c:\" & Trim(filename) & ".txt"
AvidQueryName = "OutputToVideo"
DoCmd.TransferText acExportDelim, "Comma Delimited Spec 2007", _
QueryName, FullPath, False
I noticed the following:
1) Running with Acc2003 with Win 7 Pro (64-bits), it works. Text
file was
created in the c:\ drive.
2) Running with Acc2007 with Win 7 Pro (64-bits), it gives me the
following
error: "Run-time error '3051' The Microsoft Office Access
data base
engine cannot open or write to the file. It is already opened
exclusively
by another user, or you need permission to view and write its
data."
When I changed the "FullPath" to write the text file in side
an existing
folder - it works ! This was the change:
FullPath = "c:\Test\" & Trim(filename) & ".txt"
The Win 7 Pro (64-bits) is the same for both of the about test.
It seems that Acc 2007 is not allowing me to write or create a text file in
the c:\ drive.
Can someone help me here ?? What would I need to allow this to happen ???
Thank You,
G
tesing the same code with Acc2007 with Win 7 Pro (64-bits). My Acc2003 has
Sp3 and my Acc2007 has Sp2.
This is the VBA Code that I used:
Dim FullPath As String
Dim QueryName As String
Dim filename As Variant
filename = Forms![Video Export]![Text22]
FullPath = "c:\" & Trim(filename) & ".txt"
AvidQueryName = "OutputToVideo"
DoCmd.TransferText acExportDelim, "Comma Delimited Spec 2007", _
QueryName, FullPath, False
I noticed the following:
1) Running with Acc2003 with Win 7 Pro (64-bits), it works. Text
file was
created in the c:\ drive.
2) Running with Acc2007 with Win 7 Pro (64-bits), it gives me the
following
error: "Run-time error '3051' The Microsoft Office Access
data base
engine cannot open or write to the file. It is already opened
exclusively
by another user, or you need permission to view and write its
data."
When I changed the "FullPath" to write the text file in side
an existing
folder - it works ! This was the change:
FullPath = "c:\Test\" & Trim(filename) & ".txt"
The Win 7 Pro (64-bits) is the same for both of the about test.
It seems that Acc 2007 is not allowing me to write or create a text file in
the c:\ drive.
Can someone help me here ?? What would I need to allow this to happen ???
Thank You,
G