Microsoft KB Archive/109946

{|
 * width="100%"|

ACC1x: DoMenuItem Macro to Export Object Returns Error

 * }

Q109946

-

The information in this article applies to:


 * Microsoft Access versions 1.0, 1.1

-

SYMPTOMS
When you run a macro that uses the DoMenuItem action with an Export command to export an object from your database, you receive the following error message:

Command not available: Export

RESOLUTION
To work around this problem, use the TransferText, TransferDatabase, or TransferSpreadsheet macro action instead of the DoMenuItem action.

STATUS
This problem no longer occurs in Microsoft Access version 2.0.

Steps to Reproduce Behavior
  Open the sample database NWIND.MDB. Create and save a macro with the following action:

     Action: DoMenuItem Menu Bar: Database Menu Name: File Command: Export  Create a new, unbound, blank form. Drag the macro from the Database window to the form. View the form in Form view. Click the macro command button on the form.