0

How to use excel function in access db? We have a policy numbers I would like to know if the policy number repeats return 0 otherwise 1

In excel: =IF(A2=A1),1,0

How can I write this formula in access?

Please appreciate your help.

Thanks.

  • 3
    In `MS-Access` already have `IIf ( expr , truepart , falsepart)`. [Article link](https://support.office.com/en-us/article/iif-function-32436ecf-c629-48a3-9900-647539c764e3) – Harun24hr Aug 28 '19 at 02:24

1 Answers1

1

In Access VBA you would use a Boolean (True/False)

Match = (Value2 = Value1)

If you insist, that Match must be an Integer, this will do:

Match = Abs(Value2 = Value1)

In a query it would be like:

Match: Abs([Field2]=[Field1])
Gustav
  • 53,498
  • 7
  • 29
  • 55