Phil, thanks for your response and sorry I forgot to reply. I did try your if statement, I also tried it as and if-then-else (should have the same result I believe). I don't get a compile error, but have the same issue of displaying the previous number rather than the message "No jobs Found."
Edit for clearity: Per your response in post six, the OnCurrent and text box are actually on the subform.
Edit for clearity: Per your response in post six, the OnCurrent and text box are actually on the subform.
Code:
Dim oRst As DAO.Recordset
Set oRst = Forms!jfrmJobsNotLinked.frmjsubDisplayJobsToBeLinked.Form.RecordsetClone
If oRst.EOF Then
Me!txtjRecordCount = "No jobs found"
Exit Sub
End If
oRst.MoveLast
Me!txtjSubRecordCount = "Number of jobs found: " & oRst.RecordCount
Code:
Dim oRst As DAO.Recordset
Set oRst = Forms!jfrmJobsNotLinked.frmjsubDisplayJobsToBeLinked.Form.RecordsetClone
oRst.MoveLast
If oRst.EOF Then
Me!txtjRecordCount = "No jobs found"
Exit Sub
Else
Me!txtjSubRecordCount = "Number of jobs found: " & oRst.RecordCount
End If
Comment