When you run an import wizard or export wizard in Microsoft Access 2010, you can save the settings you used so that you can repeat the operation at any time. A specification contains all the information Access needs to repeat the operation without your having to provide any input. For example, a specification that exports data to a Microsoft Excel workbook stores the name of the destination Excel file, its location, and other details, such as whether you exported the data with formatting and layout.
Note In a web database, you can create and run an import or export specification while the database is open in Access, but not while the database is running in a browser.
In the video
Create an import or export specification
- Start the import or export operation from Access by clicking one of the import or export wizards that are available on the External Data tab.
- Follow the instructions in the wizard. After you click Finish, and if Access successfully completes the operation, the Save Import Steps or Save Export Steps page appears.
- Click Save import steps or Save export steps to save the details of the operation as a specification.
Access displays an additional set of controls.
- In the Save as box, type a name for the specification.
- In the Description box, type a description to help you or other users identify the operation at a later time.
- To create an Outlook task that reminds you when it is time to repeat this operation, click Create Outlook Task.
- Click Save Import or Save Export to save the specification.
Access creates and stores the specification in the current database.
- If you clicked Create Outlook Task in step 6, an Outlook Task window appears. Fill in the details of the task and then click Save & Close.
Run a saved import or export operation
After you create an import or export specification, perform the following steps when you want to repeat the operation.
Note When you use this procedure to run a saved import or export operation, you have the option of changing the external source or destination file before you run the specification. For example, you could change the name of the source Excel file from WeeklyReport-London.xlsx to WeeklyReport-Paris.xlsx before you start your import operation.
Run the operation
- Open the Access database that contains the specification, if it is not already open. When you run an import specification, the current database is the destination database. When you run an export specification, the current database is the source database.
- If the specification exports formatted data to a Microsoft Excel workbook or a Microsoft Word document, open the object and make sure the fields that you want to export are not hidden in the view. Similarly, review the filter settings to make sure all the records you want exported are visible in the view.
- On the External Data tab, click Saved Imports or Saved Exports to select your specification.
- In the Manage Data Tasks dialog box, on the Saved Imports or Saved Exports tab, click the specification that you want to run.
- If you want to change the source file (when you are running an import operation) or the destination file (when you are running an export operation), click the path of the file to edit it.
Note You can change the source or destination files, but the new file you specify must satisfy all the requirements essential for successfully completing the operation.
- Before you click Run, you must make sure that the source and destination files exist, the source data is ready for importing, and that the operation will not accidentally overwrite any data in your destination file. Do everything that you would do to ensure the success of a wizard-driven operation before running any saved specification.
- Click Run.
Access displays a message that communicates the status of the operation. If the operation failed, troubleshoot the error the same way you would if you were using the wizard. If the message does not pinpoint the cause of the failure, try starting the import or export wizard and stepping through the dialog boxes to perform the same operation.
Run a specification by using the RunSavedImportExport macro action
In a macro, you can use the RunSavedImportExport macro action to run an import or export specification. For more information about creating macros, see the article Create a user interface (UI) macro.