1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

Accessで引数を渡しながらフォームを開きたい

Posted at

やり方

DoCmd.OpenForm の第7引数で指定できる。

フォームを開く側のサンプル
DoCmd.OpenForm "開くフォーム名", , , , , , "引数の値"

OpenArgs って変数に入る。

開かれるフォーム側で引数の値を確認サンプル
Debug.Print Me.OpenArgs

引数を複数渡したい時

  • 引数は複数設定できない。
  • 引数に文字列型以外(Dictionaryとか)は設定できない。

なので、やるとしたら『ほげ/ふが/ほにゃ』みたいな文字列を渡して、受け取った側でパースするしかない。

参考サイトさん

バージョン

Windows 10 Pro 21H2 OSビルド 19045.2251
Microsoft Access for Microsoft 365 MSO (バージョン 2209 ビルド 16.0.15726.20068) 32 ビット

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?