D
Don
I have a button on a form that filters records based upon
a value in a text box. This works fine. I was even able
to write a a function (DisplayMessage) that displays a
message is the text box is left blank.
However, here is what I am wondering.....
What if the filter has no results? The form displays with
zero records, ready to type in a new one. I would rather
display a message that says something like "Your Filter
Has no Matches"
I know reports have the OnNoData event, is there anything
I can do here on a form? The form stays open when this
button is pressed.... I was thinking there has to be some
RecordCount Property.... perhaps I can use the OnFilter
event...
Here is what I have... thanks in advance for any input.
Don
Private Sub Command70_Click()
If IsNull([txtViewUnresolved]) = True Then
DisplayMessage ("Message")
Else
Me.Filter = "AssignedTo='" & txtViewUnresolved
& "' AND Status <> 'Resolved'"
Me.FilterOn = True
End If
End Sub
a value in a text box. This works fine. I was even able
to write a a function (DisplayMessage) that displays a
message is the text box is left blank.
However, here is what I am wondering.....
What if the filter has no results? The form displays with
zero records, ready to type in a new one. I would rather
display a message that says something like "Your Filter
Has no Matches"
I know reports have the OnNoData event, is there anything
I can do here on a form? The form stays open when this
button is pressed.... I was thinking there has to be some
RecordCount Property.... perhaps I can use the OnFilter
event...
Here is what I have... thanks in advance for any input.
Don
Private Sub Command70_Click()
If IsNull([txtViewUnresolved]) = True Then
DisplayMessage ("Message")
Else
Me.Filter = "AssignedTo='" & txtViewUnresolved
& "' AND Status <> 'Resolved'"
Me.FilterOn = True
End If
End Sub