A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » New Users
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Reassign a value to a calculated form field



 
 
Thread Tools Display Modes
  #1  
Old July 14th, 2008, 01:30 PM posted to microsoft.public.access.gettingstarted
rpbsr
external usenet poster
 
Posts: 47
Default Reassign a value to a calculated form field

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
  #2  
Old July 14th, 2008, 02:07 PM posted to microsoft.public.access.gettingstarted
Dennis
external usenet poster
 
Posts: 1,222
Default Reassign a value to a calculated form field

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" wrote:

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

  #3  
Old July 14th, 2008, 04:45 PM posted to microsoft.public.access.gettingstarted
rpbsr
external usenet poster
 
Posts: 47
Default Reassign a value to a calculated form field

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" wrote:

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" wrote:

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

  #4  
Old July 14th, 2008, 04:50 PM posted to microsoft.public.access.gettingstarted
Dennis
external usenet poster
 
Posts: 1,222
Default Reassign a value to a calculated form field

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" wrote:

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" wrote:

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" wrote:

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

  #5  
Old July 14th, 2008, 05:41 PM posted to microsoft.public.access.gettingstarted
John W. Vinson
external usenet poster
 
Posts: 18,261
Default Reassign a value to a calculated form field

On Mon, 14 Jul 2008 08:45:01 -0700, rpbsr
wrote:

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).
--

John W. Vinson [MVP]
  #6  
Old July 14th, 2008, 10:50 PM posted to microsoft.public.access.gettingstarted
rpbsr
external usenet poster
 
Posts: 47
Default Reassign a value to a calculated form field



"John W. Vinson" wrote:

On Mon, 14 Jul 2008 08:45:01 -0700, rpbsr
wrote:

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).
--

John W. Vinson [MVP]

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.
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 10:45 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.