P
PJFry
I have an application where I would ideally have a continous form with a
subform. Since I can't do that, I have a form with two subforms. What I
want to do is apply a filter to subform 2 using a control on subform 1.
Main form: fSelectData_All
SF1: sfSelectData
SF2: sfPartsList
The control, btnViewParts is on SF1. When the user clicks this control, I
want to apply a fitler to SF2 based on the the MaterialRequestID on SF1. SF2
has a field for the MaterialRequestID called lngMaterialRequestID.
Here is the code I have for btnViewParts on sfSelectData:
stLinkCriteria = "[lngMaterialRequestID]=" & Me![MaterialRequestID]
Forms!fSelectData_All!sfPartList.Form.ApplyFilter = stLinkCriteria
Forms!fSelectData_All!sfPartList.Form.FilterOn = True
Any thoughts on how to accomplish this?
Thanks!
PJ
subform. Since I can't do that, I have a form with two subforms. What I
want to do is apply a filter to subform 2 using a control on subform 1.
Main form: fSelectData_All
SF1: sfSelectData
SF2: sfPartsList
The control, btnViewParts is on SF1. When the user clicks this control, I
want to apply a fitler to SF2 based on the the MaterialRequestID on SF1. SF2
has a field for the MaterialRequestID called lngMaterialRequestID.
Here is the code I have for btnViewParts on sfSelectData:
stLinkCriteria = "[lngMaterialRequestID]=" & Me![MaterialRequestID]
Forms!fSelectData_All!sfPartList.Form.ApplyFilter = stLinkCriteria
Forms!fSelectData_All!sfPartList.Form.FilterOn = True
Any thoughts on how to accomplish this?
Thanks!
PJ