RemoveAllTempVars マクロ アクション
適用先: Access 2013、Office 2013
"RemoveAllTempVars/すべての一時変数の削除" アクションは、"SetTempVar/一時変数の設定" アクションを使用して作成したすべての一時変数を削除するために使用します。
設定
"RemoveAllTempVars/すべての一時変数の削除" アクションには、引数はありません。
注釈
一度に定義しておくことのできる一時変数は、最大 255 個です。 一時変数は、削除しなければ、データベースまたはプロジェクトを閉じるまでメモリに残ったままとなります。 不要となった一時変数は削除することをお勧めします。
データベースまたはプロジェクトを閉じると、すべての一時変数が自動的に削除されます。
To remove a single temporary variable, use the RemoveTempVar action and set its argument to the name of the temporary variable you want to remove.
To run the RemoveAllTempVars action in a VBA module, use the RemoveAll method of the TempVars object.
例
The following macro demonstrates how to create a temporary variable, use it in a condition and a message box, and then remove the temporary variable by using the RemoveAllTempVars action.
条件 |
アクション |
引数 |
---|---|---|
SetTempVar |
"Name/名前": MyVarExpression: InputBox("0 以外の数字を入力してください。") |
|
[TempVars]![MyVar]<>0 |
MessageBox |
メッセージ: ="入力しました" & [TempVars]![MyVar] & "."ビープ音: YesType: 情報 |
RemoveAllTempVars |