Solved Multiple Subform Filter (1 Viewer)

mfaisal.ce

Member
Local time
Today, 14:11
Joined
Dec 21, 2020
Messages
76
Dears,

I have a Report with 02 subreports. how can i filter the subreports all in one... , means normally if i have to open the report with filter option, where clause is used but how to filter multiple subreports once...

kindly guide....

regards,
 

theDBguy

I’m here to help
Staff member
Local time
Today, 04:11
Joined
Oct 29, 2018
Messages
21,471
Isn't setting up the Linked Master and Child Fields already enough?
 

MajP

You've got your good things, and you've got mine.
Local time
Today, 07:11
Joined
May 21, 2018
Messages
8,527
As the @theDBguy said, normally subforms are linked to the mainform record. You filter main form and see child records. If that is not the case you will need to explain your set up
 

mfaisal.ce

Member
Local time
Today, 14:11
Joined
Dec 21, 2020
Messages
76
There is no master child relationship between main and sub reports but i need to show multiple sub reports on one page by date filter... each subreport has Date field, so i want to show the subreports data based on date....
 

theDBguy

I’m here to help
Staff member
Local time
Today, 04:11
Joined
Oct 29, 2018
Messages
21,471
There is no master child relationship between main and sub reports but i need to show multiple sub reports on one page by date filter... each subreport has Date field, so i want to show the subreports data based on date....
Have you tried using using the date field as the linking field?
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 19:11
Joined
May 7, 2009
Messages
19,242
add Code to the SubReport's Open event:

Private Sub Report_Open(Cancel As Integer)
On Error Resume Next
Me.Filter = "[dateField]=#4/17/2021#"
Me.FilterOn = True
End Sub
 

mfaisal.ce

Member
Local time
Today, 14:11
Joined
Dec 21, 2020
Messages
76
add Code to the SubReport's Open event:

Private Sub Report_Open(Cancel As Integer)
On Error Resume Next
Me.Filter = "[dateField]=#4/17/2021#"
Me.FilterOn = True
End Sub
it worked.... thanks a lot.... but i used a trick before your reply, i make a fake DateField and used master child relationship and passed parameter to DateField at Report open command....

thanks all....
 

theDBguy

I’m here to help
Staff member
Local time
Today, 04:11
Joined
Oct 29, 2018
Messages
21,471
it worked.... thanks a lot.... but i used a trick before your reply, i make a fake DateField and used master child relationship and passed parameter to DateField at Report open command....

thanks all....
Hi. Congratulations! Glad to hear you got it sorted out. Good luck with your project.
 

Users who are viewing this thread

Top Bottom