Sign in with Microsoft
Sign in or create an account.
Hello,
Select a different account.
You have multiple accounts
Choose the account you want to sign in with.

You can use the OpenTable macro action in Access desktop databases to open a table in Datasheet view, Design view, or Print Preview. You can also select a data entry mode for the table.

Setting

The OpenTable action has the following arguments.

Action argument

Description

Table Name

The name of the table to open. The Table Name box in the Action Arguments section of the Macro Builder pane shows all tables in the current database. This is a required argument.

If you run a macro containing the OpenTable action in a library database, Access looks for the table with this name first in the library database, then in the current database.

View

The view in which the table will open. Click Datasheet, Design, Print Preview, PivotTable, or PivotChart in the View box. The default is Datasheet.

Data Mode

The data entry mode for the table. This applies only to tables opened in Datasheet view. Click Add (the user can add new records but can't edit existing records), Edit (the user can edit existing records and add new records), or Read Only (the user can only view records). The default is Edit.

Remarks

This action is similar to double-clicking the table in the Navigation Pane, or right-clicking the table in the Navigation Pane and selecting a view.

tip

You can drag a table from the Navigation Pane to a macro action row. This automatically creates an OpenTable action that opens the table in Datasheet view.

To run the OpenTable action in a Visual Basic for Applications (VBA) module, use the OpenTable method of the DoCmd object.

Need more help?

Want more options?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.

Was this information helpful?

What affected your experience?
By pressing submit, your feedback will be used to improve Microsoft products and services. Your IT admin will be able to collect this data. Privacy Statement.

Thank you for your feedback!

×