Reassign a value to a calculated form field

R

rpbsr

I have a subform with a field that calculates Final Tuition based on the
product of course price and discount factor (1-discount). (The discount
varies based on family size and income). It works beautifully, EXCEPT, at
full discount, this discount factor is zero (1-1), which results in a Final
Tuition of zero. I'd like it to be $5.00 instead. Is it possible to possible
to reassign a value of $5.00 only when this field results in zero?

Thanks
Robert
 
D

Dennis

Make the final Tuition box hidden and put a new box on with the control
source set to
=IIF([Final Tuition]=0,5,[Final Tuition])
 
R

rpbsr

Dennis,
This helps a lot. Two questions: I can't seem to hide the final tuition box.
It works when I switch from datasheet to single form view. Is there a way to
hide it in datasheet view. If not, I can live with it.

Second question: can I get the new final tuition to say $5.00 instead of 5?
I could live with that too, but just thought I'd ask.

Thanks for your help.
Robert


Dennis said:
Make the final Tuition box hidden and put a new box on with the control
source set to
=IIF([Final Tuition]=0,5,[Final Tuition])

rpbsr said:
I have a subform with a field that calculates Final Tuition based on the
product of course price and discount factor (1-discount). (The discount
varies based on family size and income). It works beautifully, EXCEPT, at
full discount, this discount factor is zero (1-1), which results in a Final
Tuition of zero. I'd like it to be $5.00 instead. Is it possible to possible
to reassign a value of $5.00 only when this field results in zero?

Thanks
Robert
 
D

Dennis

You can't hide it in datasheet view.
Format the new field as currency the same format as you had for the Final
Tuition field.

rpbsr said:
Dennis,
This helps a lot. Two questions: I can't seem to hide the final tuition box.
It works when I switch from datasheet to single form view. Is there a way to
hide it in datasheet view. If not, I can live with it.

Second question: can I get the new final tuition to say $5.00 instead of 5?
I could live with that too, but just thought I'd ask.

Thanks for your help.
Robert


Dennis said:
Make the final Tuition box hidden and put a new box on with the control
source set to
=IIF([Final Tuition]=0,5,[Final Tuition])

rpbsr said:
I have a subform with a field that calculates Final Tuition based on the
product of course price and discount factor (1-discount). (The discount
varies based on family size and income). It works beautifully, EXCEPT, at
full discount, this discount factor is zero (1-1), which results in a Final
Tuition of zero. I'd like it to be $5.00 instead. Is it possible to possible
to reassign a value of $5.00 only when this field results in zero?

Thanks
Robert
 
J

John W. Vinson

It works when I switch from datasheet to single form view. Is there a way to
hide it in datasheet view. If not, I can live with it.

A good compromise is Continuous Form view. You can only hide a field in
datasheet by dragging its width to zero, which can be undone all too easily
and is a hassle, but it's easy in continuous form view. If you like the
datasheet look, you can make a Continuous form look very much like a
datasheet; but you have much more control and flexibility. The only thing you
lose is that the user can't resize the cells in the sheet (and that's a small
price to pay IMO).
 
R

rpbsr

John W. Vinson said:
A good compromise is Continuous Form view. You can only hide a field in
datasheet by dragging its width to zero, which can be undone all too easily
and is a hassle, but it's easy in continuous form view. If you like the
datasheet look, you can make a Continuous form look very much like a
datasheet; but you have much more control and flexibility. The only thing you
lose is that the user can't resize the cells in the sheet (and that's a small
price to pay IMO).
Ah, a very acceptable compromise John. While it's nice to see multiple
records in datasheet view, tabing through the fields would be a hastle in
that you would tab into the zero width field or have people resizing it. This
will work fine. Thanks.
 

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