I am trying to count the amount of records in a table and see if the number is greater than 0, if it is then I want a message box stating how many records there are. This is my code the problem is that I cant get it to count correctly and have no idea how to get the value, (when correct) into the message box.
Code:
Private Sub Count_Click()
Dim OpenRecordCheck As Integer
'Check to see if there are any open incidents
OpenRecordCheck = DCount("[ID]", "[Table1 Query]", [Tick] = "'True'")
If Count > 0 Then
MsgBox ("Count")
End If
End Sub