How to print all the records after each working day

can you show a snapshot of form frmPrintFilter.
 
Is it what you mean
1.PNG




2.PNG



1704420034868.png
 
try this, select a date to print and it will show the WhereCondition on the screen (but will not print). Capture the Message window and post it here for us to see.
 

Attachments

what country do you reside, i will try to use same date regional setting to test.
 
I'm from Vietnam, have you ever heard about my country, just a small one 😅
 
try again, and post if the dot(.) has changed to slash(/).

BTW, i did not change my region. I don't want to mess things, you know.
 

Attachments

Anything convenient for you, I'll follow. Here the dot(.) has changed to the slash(/)
11.PNG


12.PNG
 
Ok, I think you are OK now.
Open from frmPrintFilter in Design view and Modify the Click Event of the Print button.
Change it to:
Code:
Private Sub cmdPrint_Click()
Dim sWhere As String
sWhere = IIf(Me.lstDayToPrint <> "All", "TransDate=#" & Me.lstDayToPrint & "#", "(1=1)")
sWhere = Replace$(sWhere, ".", "/")
'MsgBox "WhereCondition: " & sWhere
'Exit Sub
Me.Visible = False
DoCmd.OpenReport _
        reportName:="Report1", _
        View:=acViewPreview, _
        WhereCondition:=sWhere
End Sub
 
Yeah, everything is OK now.
Having helped me to solve the problem from the beginning till the end,
thanks for your patience of a saint @arnelgp 😇
 

Users who are viewing this thread

Back
Top Bottom