Sent: Friday, January 26, 2018 10:37 AM
To: MS_Access_Professionals@yahoogroups.com
Subject: [MS_AccessPros] Filter Report by combo box
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: Duane Hookom <duanehookom@hotmail.com>
Reply via web post | • | Reply to sender | • | Reply to group | • | Start a New Topic | • | Messages in this topic (2) |
Tidak ada komentar:
Posting Komentar