This OUTPUT action too tough

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Air code

DoCmd.outptto acreport, "reportname", "MS
DOS..txt..", "C:\filename", false, """",

the problem is that the first time I click on this
commandbutton I get the file generated on DOS just fine,
But the subsequent times do not seems to update or
overwrite the c:\filename. Yet if I do the process
manually, File Export etc etc, ACCESS prompts me "DO YOU
WANT TO OVERWRITE THE FILENAME?" and if I click yes, it
does so

no one answered a few days ago, must be a tough one................
 
Air code:

DoCmd.outptto acreport, "reportname", "MS-
DOS..txt..", "C:\filename", false, """", 1

the problem is that the first time I click on this
commandbutton I get the file generated on DOS just fine,
But the subsequent times do not seems to update or
overwrite the c:\filename. Yet if I do the process
manually, File Export etc etc, ACCESS prompts me "DO YOU
WANT TO OVERWRITE THE FILENAME?" and if I click yes, it
does so.


no one answered a few days ago, must be a tough one.................

One possibility would be to use the Kill function to delete the file
first: trap and ignore the error if the file doesn't exist.

On Error Resume Next
Kill "C:\filename"
On Error GoTo Proc_Error
DoCmd.Outputto...
 
Back
Top