0

I appreciate some help

I am trying to use Dcount function with 4 criteria

I have a text box in a form to count records on table_orders The DCount function has 4 criteria:

The ID field in table_orders has to match the Form ID field

The field nature on table_orders has to be null

The field team on table_ordres has to be different than “Canceled”

The field ram (yes/no field) in table_ordes has to be “No”

I´ve been trying in many different ways with no success This is my last try:

=DCount("*","Table_orders","ID=" & [ID]& " AND IsNull(nature)=true" & " AND [team] <> "Canceled" & AND [ram] ="No")

Emanuel
  • 41
  • 1
  • 6

1 Answers1

0

Try this:

=DCount("*","Table_orders","ID = " & [ID] & " AND [nature] Is Null AND [team] <> 'Canceled' AND [ram] = 'No'")
Gustav
  • 53,498
  • 7
  • 29
  • 55
  • Thanks for the answer. The function may be correct, but I think I have another problem: my form's data source is not Table_orders. I really have to work on this. – Emanuel Feb 07 '23 at 15:19