subform filters

  • Thread starter Thread starter seeker
  • Start date Start date
S

seeker

I have a form frmHealthStatsInitial which has a combo box cmbMemberName and a
subform subfrmHealthstats which is based on frmhealthstats. I want the
member chosen health stats to show in the subform but all data in the query
of subform shows. I have tried
Private Sub cmbMemberName_AfterUpdate()
subfrmHealthStats.Visible = True
subfrmHealthStats!MemberNumber = cmbMemberName.Value
subfrmHealthStats.Requery
End Sub
I have tried putting forms!frmhealthstatsinitial!cmbmembernumber in the
criteria of membernumber field in query that subform is based.

both ways do not filter data to a specific member. What am I missing.
Thanks.
 
seeker said:
I have a form frmHealthStatsInitial which has a combo box cmbMemberName and a
subform subfrmHealthstats which is based on frmhealthstats. I want the
member chosen health stats to show in the subform but all data in the query
of subform shows. I have tried
Private Sub cmbMemberName_AfterUpdate()
subfrmHealthStats.Visible = True
subfrmHealthStats!MemberNumber = cmbMemberName.Value
subfrmHealthStats.Requery
End Sub
I have tried putting forms!frmhealthstatsinitial!cmbmembernumber in the
criteria of membernumber field in query that subform is based.

both ways do not filter data to a specific member. What am I missing.


I'm not clear on what you are trying to accomplish, but it
seems like you should be using the subform control's
LinkMaster/Child properties instead of all that other stuff.
I think you want LinkMaster to be the combo box and
LinkChild to be the MemberNumber field.
 
Only the subform needs to be bound. Are you sure you set
LinkChild to the record source field and not a control?
 
Back
Top