By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,647 Members | 1,178 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,647 IT Pros & Developers. It's quick & easy.

Behaviour of the DoCmd.OutputTo

P: n/a
Dear reader,

With the DoCmd.OutputTo ...... you have the possibility to write a
report to an external location.

In case the external location is an existing file the DoCmd is not
responding with the warning "File already exist". The file will be overwrite
without any warning even with the DoCmd.Setwarnings True in
frond of DoCmd.OutputTo.

Is there any one who knows the code syntax to avoid overwriting of existing
files with DoCmd.OutputTo.

Thanks for any help.

Kind regards,

Simon
May 3 '07 #1
Share this Question
Share on Google+
1 Reply


P: n/a
If Dir(FilePath) <"" Then
MsgBox "File already exists."
Else
DoCmd.OutputTo ...
End If

(the Dir function will return the name of the file if it exists)

HTH

"Simon" <Sv********@Versatel.nlwrote in message
news:46***********************@news.tele2.nl...
Dear reader,

With the DoCmd.OutputTo ...... you have the possibility to write a
report to an external location.

In case the external location is an existing file the DoCmd is not
responding with the warning "File already exist". The file will be
overwrite
without any warning even with the DoCmd.Setwarnings True
in
frond of DoCmd.OutputTo.

Is there any one who knows the code syntax to avoid overwriting of
existing
files with DoCmd.OutputTo.

Thanks for any help.

Kind regards,

Simon


May 3 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.