Jumat, 26 Januari 2018

Re: [MS_AccessPros] Filter Report by combo box

 

Duane,

ImmedSup is a Short Text data type

Jim Wagner


On ‎Friday‎, ‎January‎ ‎26‎, ‎2018‎ ‎11‎:‎31‎:‎40‎ ‎AM, Duane Hookom duanehookom@hotmail.com [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:


 

Jim,


I hope the supervisor is a "person" but I am more concerned with the data type of the ImmedSup field in your table. 


Duane




From: MS_Access_Professionals@yahoogroups.com <MS_Access_Professionals@yahoogroups.com> on behalf of Jim Wagner luvmymelody@yahoo.com [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com>
Sent: Friday, January 26, 2018 12:00 PM
To: Duane Hookom duanehookom@hotmail.com [MS_Access_Professionals]
Subject: Re: [MS_AccessPros] Filter Report by combo box
 


ImmedSup is a person

Jim Wagner


On ‎Friday‎, ‎January‎ ‎26‎, ‎2018‎ ‎10‎:‎35‎:‎54‎ ‎AM, Duane Hookom duanehookom@hotmail.com [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:


 

Add another comma before the "where clause". I added extra spaces for clarity.  I never use the other property.

Private Sub cmdOpenFilteredAccrualSummaryDirectReport_Click()
    DoCmd.OpenReport "rptAccrualSummaryWithReportsToAll", acViewPreview    ,      ,    "[ImmedSup] = " & Me..[cboSelectImmedSup]
End Sub

This assumes ImmedSup is a numeric field.


Regards,

Duane





From: MS_Access_Professionals@yahoogroups.com <MS_Access_Professionals@yahoogroups.com> on behalf of luvmymelody@yahoo.com [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com>
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: Jim Wagner <luvmymelody@yahoo.com>
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (5)

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