Jumat, 26 Januari 2018

[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: luvmymelody@yahoo.com
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (1)

Have you tried the highest rated email app?
With 4.5 stars in iTunes, the Yahoo Mail app is the highest rated email app on the market. What are you waiting for? Now you can access all your inboxes (Gmail, Outlook, AOL and more) in one place. Never delete an email again with 1000GB of free cloud storage.


.

__,_._,___

Tidak ada komentar:

Posting Komentar