The problem:
frmSearchForm builds a filter called stLinkCriteria. A button on frmSearchForm opens frmSearchResults to display the found records.
A button on frmSearchResults opens frmCCU that includes frmSearchResults as subform on a Tab called “SEARCH RESULTS”. (I am leaving frmSearchResults open.)
In my efforts to get the subform to apply the filter, the OnLoad event for frmCCU includes:
dim stLinkCriteria as String
stLinkCriteria = Forms![frmSearchResults].Filter
Debug.Print stLinkCriteria ‘stLinkCriteria is populating with the filter
[subSearchResults].SetFocus ‘try putting focus on the sub report before applying filter
DoCmd.ApplyFilter stLinkCriteria
If anyone can point out the error of my ways, I’d greatly appreciate it.
Thanks,
Randy