How to Count number of Records in form Coding

I

I H Naqvi

Hi,
I want to calculate number of records in a table, not necessarily the
record source of current form. , fulfilling certain conditions (Query Hit in
Oracle)in Form Load event. If that number is more than 0 (means having some
unattended records) then i want to display massege that records need
updating. How can I do it.
 
A

Allen Browne

Use DCount(). The 3rd argument is like the WHERE clause of a query.

Example:
DCount("*", "Table1", "City = 'New York'")

If you just want to know if there are any, DLookup() would be more
efficient. It returns Null when there are no matches.
 
Top