A
Anna
How to print the two dates in report which i input from the form.
Private Sub cmd_prntrpt_Click()
DoCmd.OpenReport "rpt_qrywebmail2", acViewPreview
end sub
Query
SELECT WM.CRC, Sum(WM.WM_Amt) AS Totamnt
FROM tbl_WebMail AS WM
WHERE (((WM.WM_Date) Between [Forms]![frmWeb_Mailfilter]![txtdate1] And
[Forms]![frmWeb_Mailfilter]![txtdate2])) OR
((([Forms]![frmWeb_Mailfilter]![txtdate1]) Is Null)) OR
((([Forms]![frmWeb_Mailfilter]![txtdate2]) Is Null))
GROUP BY WM.CRC
HAVING (((WM.CRC)=[Forms]![frmWeb_Mailfilter]![ddlcrc])) OR
((([Forms]![frmWeb_Mailfilter]![ddlcrc]) Is Null));
Thank You.
Private Sub cmd_prntrpt_Click()
DoCmd.OpenReport "rpt_qrywebmail2", acViewPreview
end sub
Query
SELECT WM.CRC, Sum(WM.WM_Amt) AS Totamnt
FROM tbl_WebMail AS WM
WHERE (((WM.WM_Date) Between [Forms]![frmWeb_Mailfilter]![txtdate1] And
[Forms]![frmWeb_Mailfilter]![txtdate2])) OR
((([Forms]![frmWeb_Mailfilter]![txtdate1]) Is Null)) OR
((([Forms]![frmWeb_Mailfilter]![txtdate2]) Is Null))
GROUP BY WM.CRC
HAVING (((WM.CRC)=[Forms]![frmWeb_Mailfilter]![ddlcrc])) OR
((([Forms]![frmWeb_Mailfilter]![ddlcrc]) Is Null));
Thank You.