次の方法で共有


QuitAccess マクロ アクション

適用先: Access 2013、Office 2013

You can use the QuitAccess action to exit Microsoft Access. The QuitAccess action can also specify one of several options for saving database objects prior to exiting Access.

注:

このアクションは、データベースが信頼されていない場合には許可されません。

Setting

"QuitAccess/Accessの終了" アクションの引数は次のとおりです。

アクションの引数

説明

オプション

Access の終了時の未保存のオブジェクトに対する処理を指定します。 [マクロ ビルダー] ウィンドウの [アクションの引数] セクションにある [オプション] ボックスで、ダイアログ ボックスを表示してオブジェクトごとに保存するかどうかを指定する場合は [確認]、ダイアログ ボックスを表示せずにすべてのオブジェクトを保存する場合は [すべて保存]、オブジェクトを保存せずに終了する場合は [終了] をクリックします。 既定値は [すべて保存] です。

注釈

Access doesn't run any actions that follow the QuitAccess action in a macro.

You can use this action to quit Access without prompts from Save dialog boxes by using a custom menu command or a button on a form. For example, you might have a master form that you use to display the objects in your custom workspace. This form could have a Quit button that runs a macro containing the QuitAccess action with the Options argument set to Save All.

This action has the same effect as clicking the File tab and then clicking Exit. If you have any unsaved objects when you click this command, the dialog boxes that appear are the same as those displayed when you use Prompt for the Options argument of the QuitAccess action.

You can use the SaveObject action in a macro to save a specified object without having to quit Access or close the object.

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