I have this code from another website but it's not working. I want to filter the split view form from another form.
PrivateSub btnSearch_Click()
'//Check that other form is loaded - if not, then open it
IfNot fIsLoaded("frmMain")Then
DoCmd.OpenForm ("frmMain")
EndIf
'//Set filter to listbox criterion
Forms("frmMain").Filter ="[Priorities] = "& Chr(34)&Me.Priorities & Chr(34)
Forms("frmMain").FilterOn =True
EndSub
Function fIsLoaded(ByVal strFormname AsString)AsBoolean
'Returns False if form is not open or True if Open
If SysCmd(acSysCmdGetObjectState, acForm, strFormname)<>0Then
If Forms(strFormname).CurrentView <>0Then
fIsLoaded =True
EndIf
EndIf
EndFunction
I received this error
This macro is already filtering the query but is it showing all the data that has priority. [MasterQuery]![Priorities]=[Priorities]