Question : Basic Form Question

I don't use forms much. But I have a form that I added a checkbox to. If the box is checked, I want a certain query field to basically  be over-ridden.

It's for an export to an accounting package; but sometimes the bill being exported is prepaid.

So if the bill isn't prepaid, it returns the normal query results, the terms: "Net 30" or "Net 10."
But if the box is checked, I need whatever normal terms to be replaced with "Prepaid"

Make sense?

Answer : Basic Form Question

In your query you can use and expresson like this

TermsCode: IIf([Forms]![MyForm]![TheCheckBoxOnTheForm]=Yes,"Prepaid",[Terms])

Where
MyForm is the name of your form
TheCheckBoxOnTheForm is the name of the check box on the form
[Terms] is the name of the query field that contains the terms value you want displayed if the checkbox is unchecked.

OM Gang
Random Solutions  
 
programming4us programming4us