Form formula help sought

Vincew

New member
Local time
Today, 12:27
Joined
Jul 15, 2024
Messages
9
Hi,
I have a formula in a form =(0.1577*Exp(1.855*([FinalPH]))/100)*[QtyjuicePressed] which is working fine.

I also have a combo box with 2 options, "Wild" & "Cultured"

I would like the above formula to be used when "Wild" is selected and if "Cultured" is selected I would like the following formula to be used =(0.1577*Exp(1.855*([FinalPH]))/100)*[QtyjuicePressed]*2

I am trying to use Iif but don't seem to be able to get the syntax correct,

The displayed result is only for guidance and not being stored or used anywhere else.

Would appreciate some help.

Cheers
Vince
 
Depends on the rowsource to your combo. If it is a value list

1;wild;2;cultured

With the first column hidden and bound to the first column, then the formula would just be

=(0.1577*Exp(1.855*([FinalPH]))/100)*[QtyjuicePressed]*[mycombo]
 
you can also use:

Code:
=(0.1577*Exp(1.855*([FinalPH]))/100)*[QtyjuicePressed]*Abs((Nz([YourCombobox], "Wild") = "Cultured")-1)

If your YourCombobox = "Wild":

=Abs(("Wild" = "Cultured") - 1)
=1

If YourCombobox = "Cultured":

=Abs(("Cultured" = "Cultured") - 1)
=2
 
Last edited:
Depends on the rowsource to your combo. If it is a value list

1;wild;2;cultured

With the first column hidden and bound to the first column, then the formula would just be

=(0.1577*Exp(1.855*([FinalPH]))/100)*[QtyjuicePressed]*[mycombo]
Thanks for this, all working as required.
 

Users who are viewing this thread

Back
Top Bottom