LoginSignup
1
3

More than 5 years have passed since last update.

Access VBA レポートを作ったときに書くべきNo Data Events

Last updated at Posted at 2017-09-26

VBAのCode

Access Access VBA reference オブジェクト モデル Report オブジェクト (Access)

Report_NoData
Private Sub Report_NoData(Cancel As Integer)

    'Add code here that will be executed if no data
    'was returned by the Report's RecordSource
    MsgBox "No customers ordered this product this month. " & _
        "The report will now close."
    Cancel = True

End Sub

これを書くレポートごとにNo Dataイヴェントに書けと。

レポートの NoData イベントを使用して、表示するデータがないときにレポートを開かないようにする方法を示します。

1
3
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
3