hello guys
am filtering my continuous form usin this code
but if the result is empty and try to search something else am getting this error
you can't reference a property or method for a control unless the control has the focus
i know that the problem is when the result is empty so the controls will not appear and then i cant refer to this hidden controls
so how to solve this problem
thanks
am filtering my continuous form usin this code
Code:
Dim str1 As String
str1 = "[Sanction_Number] LIKE " & Chr(34) & "*" & Me.Search.Text & "*" & Chr(34)
Form.Filter = str1
Form.FilterOn = True
Me.Search.Value = ""
Me.Search.SetFocus
but if the result is empty and try to search something else am getting this error
you can't reference a property or method for a control unless the control has the focus
i know that the problem is when the result is empty so the controls will not appear and then i cant refer to this hidden controls
so how to solve this problem
thanks