B Bioman Registered User. Local time Today, 13:05 Joined Feb 28, 2002 Messages 29 Mar 5, 2002 #1 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 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
B BukHix Registered User. Local time Today, 08:05 Joined Feb 21, 2002 Messages 379 Mar 5, 2002 #2 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).]
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).]