Textbox controlsource depending on a table field

J

Jen

In a form where I have a calculated textfield, is it possible to let the
user choose between two ways how this field is calculated, from another
form/table field? The user would choose this "globally" so that it would
affect every new record.

In a settingstable one field is "addtax". Based on the value here (yes/no,
1-2, whole formula..?) the controlsource for the calculated textbox would be
determined. For example, i the "addtax" field in the settings table is "1",
the calculated textbox recordsource would be
"=[hours]*[hourlyrate]*[taxpercent]/100", if the "addtax" field in the
settings table is "2", the calculated textbox recordsource would be
"=([hours]*[hourlyrate])*(1-1/(1+([taxpercent]/100)))".

Tried IIf, tried to put the whole formula into the field, tried If Then
Else.. but without success.

Jen
 

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