Hi All,
I have a form that shows the records from a table. The tables records are updated every few minutes.
In my form I compare two of the time fields and send an e-mail if the difference is over 10 minutes. This part is working great.
However, if for some reason my table has no records in it, I run into trouble. My code compares two fields from the table, but if the table is empty of course I get an error saying "The expression you entered has no value".
Here is my code to compare:
So I want the form to ignore this code if there are no records in the table.....how would I do this.
I have tried Me.Recordset.Recordcount but it doesn't seem to work.
mot98
"Is it friday yet?"
I have a form that shows the records from a table. The tables records are updated every few minutes.
In my form I compare two of the time fields and send an e-mail if the difference is over 10 minutes. This part is working great.
However, if for some reason my table has no records in it, I run into trouble. My code compares two fields from the table, but if the table is empty of course I get an error saying "The expression you entered has no value".
Here is my code to compare:
Code:
TimeDiff = DateDiff("n", Me.HLSTME, Me.CTime)
If TimeDiff > 10 Then
Call Send_Mail
Else
Call Form_Timer
End If
So I want the form to ignore this code if there are no records in the table.....how would I do this.
I have tried Me.Recordset.Recordcount but it doesn't seem to work.
mot98
"Is it friday yet?"