0
0

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でレポートを部数指定で印刷

Posted at

やり方

DoCmd.PrintOut の第五引数で部数指定で印刷可。

ただし DoCmd.PrintOut はフォームやデータシートを印刷する場合にも使える。
(使えてしまう)

なので直前にレポートを開いておく必要あり。

サンプルコード
Const REPORT_NAME As String = "テストレポート"

'レポート開く
DoCmd.OpenReport REPORT_NAME, acViewPreview

'3部印刷
DoCmd.PrintOut , , , , 3

'レポート閉じる
DoCmd.Close acReport, REPORT_NAME

参考サイトさん

バージョン

Windows 10 Pro 22H2 OSビルド 19045.2546
Microsoft Access for Microsoft 365 MSO (バージョン 2212 ビルド 16.0.16026.20002) 32 ビット

0
0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?