Combining logical functions in a form

  • Thread starter Thread starter Nick
  • Start date Start date
N

Nick

Can anyone assist...

I am trying to return a result of either "1" or "3" based
on a previous selection made in a form.

Ex: Select part number: A, B, C, D, E

If A or B is chosen, I want to return the value "1".
If C, D or E are chosen, I want to return the value "3".

Please help,

Thanks
 
Can anyone assist...

I am trying to return a result of either "1" or "3" based
on a previous selection made in a form.

Ex: Select part number: A, B, C, D, E

If A or B is chosen, I want to return the value "1".
If C, D or E are chosen, I want to return the value "3".

Please help,

Thanks

How about

Choose([PartNumber] IN ("A", "B"), 1, [PartNumber] IN ("C", "D", "E"),
3, True, NULL)

In a more realistic example with many choices, you should seriously
consider a translation table with (in this example five) rows for each
partnumber, and that partnumbers corresponding value.
 
Back
Top