Combining logical functions in a form

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
 
J

John Vinson

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top