G
Guest
Below is the code where I have an append query whereas if there are no
records to append, a message box will appear. I can't seem to get it to
recognize the fact that there are no records. I have tried "count", "If
Count = 0", etc. Please help.
Public Function Error_Cd()
On Error GoTo Err_Execute
Dim db As Database
Set db = CurrentDb
CurrentDb.QueryDefs("Check for Changed Dates").Execute dbFailOnError
Set db = Nothing
Err_Execute:
If Count = 0 Then
MsgBox "There are no changed dates"
End If
End Function
records to append, a message box will appear. I can't seem to get it to
recognize the fact that there are no records. I have tried "count", "If
Count = 0", etc. Please help.
Public Function Error_Cd()
On Error GoTo Err_Execute
Dim db As Database
Set db = CurrentDb
CurrentDb.QueryDefs("Check for Changed Dates").Execute dbFailOnError
Set db = Nothing
Err_Execute:
If Count = 0 Then
MsgBox "There are no changed dates"
End If
End Function