S Sandy Jul 23, 2008 #1 Hello - How do I code an Event to change the Record Source of a subform? Thanks sandra
S Sandy Jul 23, 2008 #2 Sorry - I figured it out. I created the queries I wanted then programmed 2 buttons to apply the SQL to my record source as follows: Private Sub ShowAllBut_Click() Dim stFilterSQL As String stFilterSQL = "the SQL view of my query here" Me.RecordSource = stFilterSQL Me.Requery End Sub Sorry for the bother!
Sorry - I figured it out. I created the queries I wanted then programmed 2 buttons to apply the SQL to my record source as follows: Private Sub ShowAllBut_Click() Dim stFilterSQL As String stFilterSQL = "the SQL view of my query here" Me.RecordSource = stFilterSQL Me.Requery End Sub Sorry for the bother!
M Marshall Barton Jul 23, 2008 #3 Sandy said: Sorry - I figured it out. I created the queries I wanted then programmed 2 buttons to apply the SQL to my record source as follows: Private Sub ShowAllBut_Click() Dim stFilterSQL As String stFilterSQL = "the SQL view of my query here" Me.RecordSource = stFilterSQL Me.Requery End Sub Click to expand... That's good. Just one comment though. Using Requery here is a waste of processing because setting the RecordSource automatically takes care of that.
Sandy said: Sorry - I figured it out. I created the queries I wanted then programmed 2 buttons to apply the SQL to my record source as follows: Private Sub ShowAllBut_Click() Dim stFilterSQL As String stFilterSQL = "the SQL view of my query here" Me.RecordSource = stFilterSQL Me.Requery End Sub Click to expand... That's good. Just one comment though. Using Requery here is a waste of processing because setting the RecordSource automatically takes care of that.