ES-Components
asked on
Can I Stop Access 2007 from asking "Do You Want To Replace The Existing File?
I am using Access 2007 and have what I believe is a simple Macro. I basically want to output a Report to a folder on my PC. Each time I run the Macro it asks me "Do I want to replace the existing file? (I do not want to see this prompt)
I attached a jpeg of the Macro Action Arguments that I used alng with the prompt.
Is there a simple way to eliminate the prompt as I want to run this Macro as an
"AutoExec" macro?
If there is special coding to be done, please explain where as I am not an Access Expert.
Any help would be greatly appreciated.
Rick
AccessMacroError.jpg
I attached a jpeg of the Macro Action Arguments that I used alng with the prompt.
Is there a simple way to eliminate the prompt as I want to run this Macro as an
"AutoExec" macro?
If there is special coding to be done, please explain where as I am not an Access Expert.
Any help would be greatly appreciated.
Rick
AccessMacroError.jpg
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I forgot to add that you would add the following before the Output line:
Action: RunCode
KillProperly("\\Server\esc files\Intr anet\Contr olPanel\Wo rd\ARColle ctions-All .rtf")
Action: RunCode
KillProperly("\\Server\esc
ASKER
capricorn1
I think I got it to work. But there is another error.
Any ideas as to how to get this fixed?
See attached jpeg's for macro and error message
Thank you...
Rick
AccessMacro2.jpg
AccessMacro2Error.jpg
I think I got it to work. But there is another error.
Any ideas as to how to get this fixed?
See attached jpeg's for macro and error message
Thank you...
Rick
AccessMacro2.jpg
AccessMacro2Error.jpg
read the messages from the error window,
check if any of those applies to your case, it is pretty straightforward
check if any of those applies to your case, it is pretty straightforward
;-) ?
RunCode
Function Name ExportReport()
then create this function in a regular module
Function exportReport()
Dim fPath As String, fName As String
fPath = "\\Server\escfiles\Intrane
fName = "ARCollections-All.rtf"
If Dir(fPath & fName) <> "" Then Kill fPath & fName
DoCmd.OutputTo acOutputReport, "ARCollections-All", acFormatRTF, fPath & fName, no, , , acExportQualityPrint
End Function
.