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

Why Two Windows Dialog Boxes for OuputTo?

P: n/a
I just changed my previous Access 97 ActiveX controls that I was using
for the OutputTo actions to API Calls. Apparently, I'm not there yet
as I am having difficulty with two items.

The first is a nuisance. Now the OutputTo brings up the GetOpenFile
Windows Dialog Box and whether you type in a file name or not, it is
superceded by a similar "Output To" Dialog Box where you need to type
in the file name again before it is saved. This is a pain. Is there a
workaround for this issue? And if so, how is it done?

The second item appears to be a strange problem. I'm able to save the
query OutputTo to the hard drive, but it cannot be saved to a floppy
disk. Yes, the drive works and using the old ActiveX control, the
files can be save to disk. The drive is activated during the save
process and appears to a have worked, but there is no output! Can
anyone explain this and how to resolve it?

Here is the code that I'm using:

Private Sub cmdCopy_Click()

DoCmd.OutputTo acOutputQuery, "Data", acFormatHTML, "", _
True, "C:\Program Files\Databases\Template\DataTemplate.html" _
= GetOpenFile("A:\", "Ignore First Dialog Proceed to Second One")

End Sub

Anyone's assistance in this perplexing matter will be appreciated.
Thanks, Dalan
Nov 12 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Dalan wrote:
I just changed my previous Access 97 ActiveX controls that I was using
for the OutputTo actions to API Calls. Apparently, I'm not there yet
as I am having difficulty with two items.

The first is a nuisance. Now the OutputTo brings up the GetOpenFile
Windows Dialog Box and whether you type in a file name or not, it is
superceded by a similar "Output To" Dialog Box where you need to type
in the file name again before it is saved. This is a pain. Is there a
workaround for this issue? And if so, how is it done?

The second item appears to be a strange problem. I'm able to save the
query OutputTo to the hard drive, but it cannot be saved to a floppy
disk. Yes, the drive works and using the old ActiveX control, the
files can be save to disk. The drive is activated during the save
process and appears to a have worked, but there is no output! Can
anyone explain this and how to resolve it?

Here is the code that I'm using:

Private Sub cmdCopy_Click()

DoCmd.OutputTo acOutputQuery, "Data", acFormatHTML, "", _
True, "C:\Program Files\Databases\Template\DataTemplate.html" _
= GetOpenFile("A:\", "Ignore First Dialog Proceed to Second One")

End Sub

Anyone's assistance in this perplexing matter will be appreciated.
Thanks, Dalan


Why don't you call the GetOpenFile() prior to the OutPutTo?
Dim strFile As STring
strFile = GetOpenFile(.....)
If strFile <> "" Then Docmd.OutPutTo......
and substitute strFile for =GetOpenFile(). I don't recall of the top of
my head if the return of GetOpenFile is a string or variant or "" or Nul.
If variant, modify and check for Null if that is returned.
Nov 12 '05 #2

P: n/a
Salad <oi*@vinegar.com> wrote in message news:<40***************@vinegar.com>...

Why don't you call the GetOpenFile() prior to the OutPutTo?
Dim strFile As STring
strFile = GetOpenFile(.....)
If strFile <> "" Then Docmd.OutPutTo......
and substitute strFile for =GetOpenFile(). I don't recall of the top of
my head if the return of GetOpenFile is a string or variant or "" or Nul.
If variant, modify and check for Null if that is returned.

I tried this and variations to the same theme, but still not resolved.
Leaving the save as file name as "" in the OutputTo string does bring
up the OutputTo dialog box for entering the file name before saving.
If a file name is included, then OutputTo box does not appear, but
also nothing gets written to disk either. I have tried just about
every option in restructing the code and the OutputTo action in an
effort to get it to work, but to no avail.

Any further suggestions would be welcomed. Thanks.
Nov 12 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.