Exporting TXT fixed file export

P

Peter Adema

I am trying to export a query to a TXT fixed file.
I do this with the next VB command:
Private Sub EXPORT_Click()
On Error GoTo Err_EXPORT_Click
Dim stDocName As String
stDocName = "q_hertz1"
DoCmd.TransferText acExportFixed, "q_hertz1", stDocName,
"I:/HERTZ_NL/HERTZ.txt", -1
'DoCmd.TransferText acExportFixed, "q_hertz1", stDocName, "D:/HERTZ.txt", -1
Exit_EXPORT_Click:
Exit Sub

Err_EXPORT_Click:
MsgBox Err.Description
Resume Exit_EXPORT_Click

If I export this file to the D-drive, the old file is being replaced.
If I export to the I-drive, Access gives me the next message with only a OK
button:"Table "Hertz#txt" already exists"

Why can I not export to this drive?
 
A

Andi Mayer

I am trying to export a query to a TXT fixed file.
I do this with the next VB command:
Private Sub EXPORT_Click()
On Error GoTo Err_EXPORT_Click
Dim stDocName As String
stDocName = "q_hertz1"
DoCmd.TransferText acExportFixed, "q_hertz1", stDocName,
"I:/HERTZ_NL/HERTZ.txt", -1
'DoCmd.TransferText acExportFixed, "q_hertz1", stDocName, "D:/HERTZ.txt", -1
Exit_EXPORT_Click:
Exit Sub

Err_EXPORT_Click:
MsgBox Err.Description
Resume Exit_EXPORT_Click

If I export this file to the D-drive, the old file is being replaced.
If I export to the I-drive, Access gives me the next message with only a OK
button:"Table "Hertz#txt" already exists"

Why can I not export to this drive?

lets Asume the D-Drive is local and the I-Drive is on a network

do you have delete-privilege on the I-Drive?
If you expect an answer to a personal mail, add the word "manfred" to the first 10 lines in the message
MW
 
P

Peter Adema

Andi Mayer said:
lets Asume the D-Drive is local and the I-Drive is on a network

do you have delete-privilege on the I-Drive?
If you expect an answer to a personal mail, add the word "manfred" to the first 10 lines in the message
MW
Thanks for your answer.

You are right that the I-drive is a network drive.
But I can copy the file I created on the D-drive and than copy it to the
I-drive without any problems.
 
A

Andi Mayer

You are right that the I-drive is a network drive.
But I can copy the file I created on the D-drive and than copy it to the
I-drive without any problems.

I am talking about deletion not creating, this a two different pair of
shoes.

look which rights you have on this drive
If you expect an answer to a personal mail, add the word "manfred" to the first 10 lines in the message
MW
 

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