The information in this article applies to:
SYMPTOMS
Moderate: Requires basic macro, coding, and interoperability skills.
When you try to output a file from your custom application by using the
OutputTo method on a computer that never had Microsoft Access installed,
you may receive the following error message:
OutputTo action was canceled.
This behavior occurs when the OutputTo method does not contain the
Outputfile argument. For example:
DoCmd.OutputTo acOutputReport, "Report Name", acFormatRTF,,False
This behavior does not occur in the retail version of Microsoft Access.
CAUSE
In the retail version of Microsoft Access, if you leave the Outputfile
argument blank, Microsoft Access will prompt you for an output file name.
However, in a custom application this feature is not provided.
RESOLUTION
You must supply the information for the OutputTo Outputfile parameter for
your custom application.
STATUS
This behavior is by design.
MORE INFORMATION
Steps to Reproduce Behavior
- Start Microsoft Access 97 and open any database that contains a
report.
- Create a new form in Design view and add a command button to the form.
In the Property box for the command button, change the Name property
to RptOutput.
- Type the following for the OnClick Event procedure for the command
button:
Private Sub RptOutput_Click()
DoCmd.OutputTo acOutputReport, "<Report Name>", acFormatRTF,,False
End Sub
- Close the module and save the form as frmForm1. Switch the frmForm1
form to Form view.
- Click the RptOutput button. Note that the OutputTo dialog box is
displayed.
- Close the OutputTo dialog box. Click End to the OutputTo error message.
- Close the frmForm1 form.
- On the Tools menu, click Startup, and select the frmForm1 form in the
Display Form list box. Click OK to close the Startup box.
- Close the database.
- Start the Microsoft Office 97 Developer Edition Tools Setup Wizard.
- On the Introduction screen, accept the default, and click Next.
- On the Add Files screen, add the database from step 1, click the "Set
as Application's Main File" check box, and then click Next.
- On the Shortcuts screen, click Add. Click the Database Shortcut
Properties tab and type a description for your shortcut. Click the
Run-Time check box, and then click Next.
- Click Yes to the Setup Wizard message box. Click OK to the second
Setup Wizard message box.
- Click Next three times, and type My OutPutTo Application in the "What
is the name of your application?" box.
- Click Finish. Click No when asked if you want to save the template.
- After the disk images are completed, run setup for My OutPutTo
Application on any computer.
- After the Setup program is finished, start the My OutPutTo Application.
- When the application opens to your Startup form, click the OutputTo
button.
Note that you receive the error message mentioned in the "Symptoms"
section.
Keywords : OtpProb kberrmsg kbusage
Version : 97
Platform : WINDOWS
Hardware : x86
Issue type : kbprb
Solution Type : Info_Provided