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のVBAでレポート一覧取得

Last updated at Posted at 2023-02-16

やり方

レポート名一覧確認サンプル
Dim report_ As AccessObject
For Each report_ In CurrentProject.AllReports
    Debug.Print report_.Name
Next

例えば下記のような場合…
image.png

サンプルコードの結果は下記。
image.png

Report型が使えない

『Report』っていう型があるので、For Each内はこれで受けようと思った。
image.png

でも下記のように例外になってしまう。
image.png

理由が分からなかったのでAccessObjectで受けてる。

バージョン

Windows 10 Pro 22H2 OSビルド 19045.2604
Microsoft Access for Microsoft 365 MSO (バージョン 2212 ビルド 16.0.16026.20002) 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?