Special condition in a if

Bioman

Registered User.
Local time
Today, 13:05
Joined
Feb 28, 2002
Messages
29
I want to code a function that checks if the number of record in a table is > 0.

If count(table.record=-1) > 0
DoCmd...
DoCmd...
DoCmd...


Thanks
 
I think the Dcount is what you are looking for. The syntax is similar to a Dlookup. Here is an example.

Code:
If DCount("[JobNumber]", "TimeGR", "[JobNumber]= '" _
        & strInput & "'") = 0 Then
' Do something here ....

If DCount("[FieldName]", "TableName", "[FieldName]= '" & Criteria & "'") > 0 Then
Do something here...


[This message has been edited by BukHix (edited 03-05-2002).]
 

Users who are viewing this thread

Back
Top Bottom