目次

月の1日と最終日を取得する

1日

=DateSerial(Year(Date()), Month(Date()), 1)

最終日

=DateAdd("d",-1,DateSerial(Year(Date()), Month(Date())+1, 1))

フォーム上で期間抽出する場合

テーブルの「日付」フィールドに対するフィルターです。

Me.Filter = "日付 >= #" & DateSerial(Year(Date()), Month(Date()), 1) & "# and 日付 <= #" & DateAdd("d",-1,DateSerial(Year(Date()), Month(Date())+1, 1)) & "#"