No records on my form object does not exist

paulevans

Registered User.
Local time
Today, 00:39
Joined
Mar 7, 2006
Messages
79
Hi
I how can I find out if my form has any records or not. I have a form that gets its data from a query. If the conditions of the query are not met then no data is shown. However my exit button tries to calculate a value based on the recors shown if the condition was met.

When the condition is not met and no records are found a message come up with.

The expressionyou you entered refers to an object that is closed or doesn't exist.

How can I avoid this error

Thanks in advance
 
if Me.RecordsetClone.RecordCount>0 then
msgbox "Records Exist"
else
msgbox "No Records Exist"
end if
 
Thanks Allan

That worked a treat.
 

Users who are viewing this thread

Back
Top Bottom