Solved Filtering in the report (1 Viewer)

aref

New member
Local time
Today, 09:43
Joined
Jan 10, 2023
Messages
27
Hello
I made a report from the table, in this report I want the items displayed in the date column to be filtered, and this filter only includes items greater than zero, and the records that are zero or null are not seen in the report.
Thanks
 

Attachments

  • Report.zip
    30.4 KB · Views: 83

June7

AWF VIP
Local time
Today, 00:43
Joined
Mar 9, 2014
Messages
5,493
You want to exclude records? Apply filter criteria to report using WHERE CONDITION argument of DoCmd.OpenReport method.

Code:
Private Sub Command10_Click()
If IsNull(Cmb_date) Then
    MsgBox "Please Select date ... ", vbCritical, "*"
    Cmb_date.SetFocus
    Cmb_date.Dropdown
Else
    Date_Num = Right(Me.Cmb_date, 1)
    DoCmd.OpenReport "Tab_Data", acViewPreview, , "Date_" & Date_Num & ">0", acDialog
End If
End Sub
 
Last edited:

ebs17

Well-known member
Local time
Today, 10:43
Joined
Feb 7, 2020
Messages
1,983
Fields like Date_1, Date_2, ... Date_396 - if you don't just want to play something, but want to work properly, then you should normalize very quickly and resolve columns into rows.
 

Users who are viewing this thread

Top Bottom