P
programmingrookie
I've coded a label to become visible based on the number of results in a
filtered form. The problem I run into is I can't set the label's visible
property to "no" if the query is null.
Private Sub Form_Current()
Dim Terms As Integer
Dim rst As Object
Set rst = Me.RecordsetClone
On Error Resume Next
rst.MoveLast
On Error GoTo 0
Terms = rst.RecordCount
If Terms > 1 Then
Form_frmApplicants.Label60.Visible = True
ElseIf IsNull(Terms) Then
Form_frmApplicants.Label60.Visible = False
Else: Form_frmApplicants.Label60.Visible = False
End If
End Sub
Any Ideas?
filtered form. The problem I run into is I can't set the label's visible
property to "no" if the query is null.
Private Sub Form_Current()
Dim Terms As Integer
Dim rst As Object
Set rst = Me.RecordsetClone
On Error Resume Next
rst.MoveLast
On Error GoTo 0
Terms = rst.RecordCount
If Terms > 1 Then
Form_frmApplicants.Label60.Visible = True
ElseIf IsNull(Terms) Then
Form_frmApplicants.Label60.Visible = False
Else: Form_frmApplicants.Label60.Visible = False
End If
End Sub
Any Ideas?