Change query in subform

Ron_dK

Cool bop aficionado
Local time
Today, 16:35
Joined
Sep 5, 2002
Messages
2,141
Another one I'm struggling with.
I have a mainform and a subform. What I want to achive is :
click on a lable (lab1) in the mainform and set the recordsource ( query1 ) in the subform to display relevant data.
Click on a lable ( lab2) in the mainform and set the recordsouce (query2) having different data than query1 in the subform.

Hope this make sense.

How would I do this.
 
Something like
[yourSub].Form.RecordSource = "SELECT etc
Me.Refresh
 
I knew I could count on you Rich.
Have revised your suggestion to :

Private Sub Label188_Click()
[Subform-statistics-plants].Form.RecordSource = "Qrysubstatisticsplants"
Me.Requery
End Sub

Brilliant,
Thanks, Ron
 

Users who are viewing this thread

Back
Top Bottom