Hi all,
I have a report named rptAccrualSummaryWithReportsToAll. I am trying to run a docmd.openreport to filter by a query. I have tried the following and I still get all of the records. I have done some research and these are the two ways I found that should work.
If I could be directed in the correct syntax, I would appreciate it.
Thank You
Jim Wagner
The sql of the query is
SELECT AccrualsForReport.ImmedSup
FROM AccrualsForReport
GROUP BY AccrualsForReport.ImmedSup
HAVING (((AccrualsForReport.ImmedSup)=[Forms]![frmMainTabbedForm]![cboSelectImmedSup]));
Private Sub cmdOpenFilteredAccrualSummaryDirectReport_Click()
DoCmd.OpenReport "rptAccrualSummaryWithReportsToAll", acViewPreview, '"qrySelectImmedSupIndividual"
End Sub
Private Sub cmdOpenFilteredAccrualSummaryDirectReport_Click()
DoCmd.OpenReport "rptAccrualSummaryWithReportsToAll", acViewPreview, "[ImmedSup] = " & Me.[cboSelectImmedSup]
End Sub
Posted by: luvmymelody@yahoo.com
Reply via web post | • | Reply to sender | • | Reply to group | • | Start a New Topic | • | Messages in this topic (1) |
Tidak ada komentar:
Posting Komentar