Thanks in advance for the help.
The goal: Display the number of results returned by a query in a sub form.
The problem: If the query returns no results the txtBox will continue to display the last record count.
Originally I had this in Form_Current()
Then I wrapped it in an If statement but that didn't solve it.
I'm missing something...
The goal: Display the number of results returned by a query in a sub form.
The problem: If the query returns no results the txtBox will continue to display the last record count.
Originally I had this in Form_Current()
Code:
Me!txtjRecordCount = "Number of jobs found: " & Me.RecordsetClone.RecordCount
Code:
Private Sub Form_Current()
If Me.RecordsetClone.RecordCount <> 0 Then
Me!txtjRecordCount = "Number of jobs found: " & Me.RecordsetClone.RecordCount
Else
Me!txtjRecordCount = "No jobs found."
End If
End Sub
Comment