IIF statement based on Yes / No selection on form

T

Thomas Hardy

Hi,

How can I get a query to take the value of a checkbox on a form into account
in a formula?

The checkbox may read Yes or No at the time you click on button on the same
form to trigger the calculation, and then some of the formulae will refer to
this in the calculations, e.g.:

IIF(checkbox is checked, Calculation A, Calculation B)

Thanks very much

Thomas
 
P

Pat Hartman

If Me.YourCheckbox = True Then
Me.YourResult = calc1
Else
Me.YourResult = calc2
End If
 
K

Ken Snell [MVP]

You're wanting to do this in a query, correct?

You would use an IIf statement like this:

IIf(Forms!FormName!CheckboxName=True,Calculation A, Calculation B)
 

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