M
Mel via AccessMonster.com
My question runs fine to check if there are any rows. But it does check if
it's a new record and no rows exist yet. Here's my code:
Dim intX As Integer
Dim rs As DAO.Recordset
'****this runs to find if any records have "yes" in the flag field
intX = DCount ("*", "qryContgYes")
If intX > 0 Then
'if it does, then it's okay, exit the routine
exit sub
else
'if all the records have "No" in the flag field then open warning form
Docmd.OpenForm "frmWarning"
End if
This works fine until it meets the condition of a new record when there are
not records yet.
How would I code to check for no rcds?
I tried intX = -0, but that didn't work
Please help..
Thanks,
Mel
it's a new record and no rows exist yet. Here's my code:
Dim intX As Integer
Dim rs As DAO.Recordset
'****this runs to find if any records have "yes" in the flag field
intX = DCount ("*", "qryContgYes")
If intX > 0 Then
'if it does, then it's okay, exit the routine
exit sub
else
'if all the records have "No" in the flag field then open warning form
Docmd.OpenForm "frmWarning"
End if
This works fine until it meets the condition of a new record when there are
not records yet.
How would I code to check for no rcds?
I tried intX = -0, but that didn't work
Please help..
Thanks,
Mel