Microsoft KB Archive/197589

= ACC2000: Exporting SQL Specific Query to HTML Causes Error =

Article ID: 197589

Article Last Modified on 6/28/2004

-

APPLIES TO


 * Microsoft Access 2000 Standard Edition

-



This article was previously published under Q197589



Moderate: Requires basic macro, coding, and interoperability skills.



SYMPTOMS
When you export a data definition query or a SQL pass-through query to HTML format, you may receive the following error message:

Microsoft Access

The command or action 'OutputTo' isn't available now.

You may be in a read-only database or an unconverted database from an earlier version of Microsoft Access.

The type of object the action applies to isn't currently selected or isn't in the active view.

Use only those commands and macro actions that are currently available for this database.



CAUSE
You cannot export data-definition and SQL pass-through queries that do not return any records to HTML format.



RESOLUTION
Use only queries that return records when you want to export the results to HTML format.



Steps to Reproduce Behavior
 Open the sample database Northwind.mdb. Create a new query in Design view. Click Close in the Show Table box. On the Query menu, point to SQL Specific, and then click Data Definition. In the Data Definition Query dialog box, type the following SQL statement:

CREATE TABLE MyTable (FirstName TEXT, LastName TEXT);

</li> Save and close the query as Query1.</li> On the File menu, click Export.</li> Type Query1 in the File name box. In the Save as type list, click HTML (*.html;*.htm). Click Save.</li> Click OK.

Note that you receive the error message mentioned in the "Symptoms" section.</li></ol>

<div class="references_section">