Connecting Tech Pros Worldwide Forums | Help | Site Map

replace value

trhq
Guest
 
Posts: n/a
#1: Nov 12 '05
I am working on a text box (Net_Income) that derive its value from 2
variables;
=[Total_Income]-[Total_Expenses]
I like to limit the value to zero if the Total_Expenses is greater than
Total Income.
What do I need to do to limit the derived value to zero. (no negative
value).

Thanks.



Jim Allensworth
Guest
 
Posts: n/a
#2: Nov 12 '05

re: replace value


On Mon, 03 Nov 2003 18:50:55 GMT, "trhq" <trhq@sbcglobal.net> wrote:
[color=blue]
>I am working on a text box (Net_Income) that derive its value from 2
>variables;
> =[Total_Income]-[Total_Expenses]
>I like to limit the value to zero if the Total_Expenses is greater than
>Total Income.
>What do I need to do to limit the derived value to zero. (no negative
>value).
>[/color]

In the Format property of the textbox use ...
0;\0

- Jim
Phil Stanton
Guest
 
Posts: n/a
#3: Nov 12 '05

re: replace value


=iif([Total_Income]>[Total_Expenses], [Total_Income]-[Total_Expenses],0)
Yes it is iif, not if. Gives first option before the comma if the condition
is true or last thing in the bracket if the condition is false.

Phil

"trhq" <trhq@sbcglobal.net> wrote in message
news:jsxpb.12669$tf5.753@newssvr14.news.prodigy.co m...[color=blue]
> I am working on a text box (Net_Income) that derive its value from 2
> variables;
> =[Total_Income]-[Total_Expenses]
> I like to limit the value to zero if the Total_Expenses is greater than
> Total Income.
> What do I need to do to limit the derived value to zero. (no negative
> value).
>
> Thanks.
>
>[/color]


trhq
Guest
 
Posts: n/a
#4: Nov 12 '05

re: replace value



Thanks for the tip Jim. However, that will suppress the Currency format.

Ernesto


"Jim Allensworth" <jimNOT@Notdatacentricsolutions.com> wrote in message
news:3fa6aba3.875161578@news.west.earthlink.net...[color=blue]
> On Mon, 03 Nov 2003 18:50:55 GMT, "trhq" <trhq@sbcglobal.net> wrote:
>[color=green]
> >I am working on a text box (Net_Income) that derive its value from 2
> >variables;
> > =[Total_Income]-[Total_Expenses]
> >I like to limit the value to zero if the Total_Expenses is greater than
> >Total Income.
> >What do I need to do to limit the derived value to zero. (no negative
> >value).
> >[/color]
>
> In the Format property of the textbox use ...
> 0;\0
>
> - Jim[/color]


Jim Allensworth
Guest
 
Posts: n/a
#5: Nov 12 '05

re: replace value


Ah, if you want the currency format, use...
$#,##0.00;"$0.00"

- Jim

On Tue, 04 Nov 2003 16:19:36 GMT, "trhq" <trhq@sbcglobal.net> wrote:
[color=blue]
>
>Thanks for the tip Jim. However, that will suppress the Currency format.
>
>Ernesto
>
>
>"Jim Allensworth" <jimNOT@Notdatacentricsolutions.com> wrote in message
>news:3fa6aba3.875161578@news.west.earthlink.net.. .[color=green]
>> On Mon, 03 Nov 2003 18:50:55 GMT, "trhq" <trhq@sbcglobal.net> wrote:
>>[color=darkred]
>> >I am working on a text box (Net_Income) that derive its value from 2
>> >variables;
>> > =[Total_Income]-[Total_Expenses]
>> >I like to limit the value to zero if the Total_Expenses is greater than
>> >Total Income.
>> >What do I need to do to limit the derived value to zero. (no negative
>> >value).
>> >[/color]
>>
>> In the Format property of the textbox use ...
>> 0;\0
>>
>> - Jim[/color]
>
>[/color]

trhq
Guest
 
Posts: n/a
#6: Nov 12 '05

re: replace value



That did it, man! Thanks a lot.



"Jim Allensworth" <jimNOT@Notdatacentricsolutions.com> wrote in message
news:3fa7e044.954170656@news.west.earthlink.net...[color=blue]
> Ah, if you want the currency format, use...
> $#,##0.00;"$0.00"
>
> - Jim
>
> On Tue, 04 Nov 2003 16:19:36 GMT, "trhq" <trhq@sbcglobal.net> wrote:
>[color=green]
> >
> >Thanks for the tip Jim. However, that will suppress the Currency format.
> >
> >Ernesto
> >
> >
> >"Jim Allensworth" <jimNOT@Notdatacentricsolutions.com> wrote in message
> >news:3fa6aba3.875161578@news.west.earthlink.net.. .[color=darkred]
> >> On Mon, 03 Nov 2003 18:50:55 GMT, "trhq" <trhq@sbcglobal.net> wrote:
> >>
> >> >I am working on a text box (Net_Income) that derive its value from 2
> >> >variables;
> >> > =[Total_Income]-[Total_Expenses]
> >> >I like to limit the value to zero if the Total_Expenses is greater[/color][/color][/color]
than[color=blue][color=green][color=darkred]
> >> >Total Income.
> >> >What do I need to do to limit the derived value to zero. (no negative
> >> >value).
> >> >
> >>
> >> In the Format property of the textbox use ...
> >> 0;\0
> >>
> >> - Jim[/color]
> >
> >[/color]
>[/color]


Closed Thread