ACC97: No Prompt for Parameter Value Exporting Form w/ OutputToID: Q170699
|
Moderate: Requires basic macro, coding, and interoperability skills.
You are not prompted to enter a parameter value when you output a form to
text if the form is bound to a query that contains an invalid form control
reference on its Criteria row. However, the text file that is created does
not contain any data.
This behavior occurs if you use implicit form control referencing in the
query. For example:
Forms![FormName]![ControlName]
To ensure that the text file that is created contains data, use explicit
form control referencing in your query, or use the control's Value
property. For example:
Forms![FormName].[ControlName]
-or-
Forms![FormName]![Controlname].Value
Microsoft has confirmed this to be a problem in Microsoft Access 97.
You can use the OutputTo action or method to output the data in a specified Microsoft Access database object (a datasheet, form, report, or module) to a file in Microsoft Excel 97 (*.xls), MS-DOS text (*.txt), or rich-text (*.rtf) format.
Forms![Form100]![Customer]
Sub Test()
DoCmd.OutputTo acOutputForm, "Form100", acFormatTXT, "C:\Junk.txt"
End Sub
Keywords : kbusage OtpOthr
Version : 97
Platform : WINDOWS
Issue type : kbbug
Last Reviewed: April 28, 1999