Out of curiosity, how would I use the DCount in this situation?
Dim lngCount As Long
lngCount = DCount("*", "[tblEventInformation]", "[Incident] =" & Me.Incident)
If lngCount > 0 Then
Me.VictimRecordNumber.Caption = "Displaying Victim # " & CurrentRecord & " of " & RecordsetClone.RecordCount
else
msgbox "No Records"
DoCmd.Close acForm, Me.Name
End If
I would use RecordsetClone
Code:
Dim rs As DAO.Recordset
Set rs = Me.RecordsetClone
rs.MoveLast
If rs.RecordCount > 0 Then
Me.VictimRecordNumber.Caption = "Displaying Victim # " & Me.CurrentRecord & " of " & rs.RecordCount
Else
MsgBox "No records match your criteria"
DoCmd.Close acForm, Me.Name
End If