ACC2000: Exporting SQL Specific Query to HTML Causes Error

ID: Q197589


The information in this article applies to:

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.


MORE INFORMATION

Steps to Reproduce Behavior

  1. Open the sample database Northwind.mdb.


  2. Create a new query in Design view.


  3. Click Close in the Show Table box.


  4. On the Query menu, point to SQL Specific, and then click Data Definition.


  5. In the Data Definition Query dialog box, type the following SQL statement:


  6. CREATE TABLE MyTable (FirstName TEXT, LastName TEXT);
  7. Save and close the query as Query1.


  8. On the File menu, click Export.


  9. Type Query1 in the File name box. In the Save as type list, click HTML (*.html;*.htm). Click Save.


  10. Click OK.

    Note that you receive the error message mentioned in the "Symptoms" section.



REFERENCES

For more information about exporting queries to HTML format, click Microsoft Access Help on the Help menu, type "export a datasheet to static HTML format" in the Office Assistant or the Answer Wizard, and then click Search to view the topic.

Additional query words: prb


Keywords          : kberrmsg kbdta IntpWeb 
Version           : WINDOWS:2000
Platform          : WINDOWS 
Issue type        : kbprb 

Last Reviewed: July 15, 1999