=Sum(nz([intReceived])+nz([intAdjusted])-nz([intSold]))

=Sum(nz([intReceived])+nz([intAdjusted])-nz([intSold]))

am 01.11.2007 19:15:19 von thompsoa02

Hi, Everyone

I've created a basic Inventory stock control system using Access 2000,
it's a basic in and out system, however if i Recieve more than i've
Sold, it will give me a negative Value in the text box bound to it.

the text box is bound using this =[frmProductsSub].Form!UnitsOnHand

The subform Sum is this =Sum(nz([intReceived])+nz([intAdjusted])-
nz([intSold]))

Is their anything i can add to this Sum or a code i can add to the
back of the form to stop this and give a warning of some kind like a
Message box?



Thanks in advance,

Kind Regards

Andy

Re: =Sum(nz([intReceived])+nz([intAdjusted])-nz([intSold]))

am 02.11.2007 13:54:49 von Tom van Stiphout

On Thu, 01 Nov 2007 11:15:19 -0700, thompsoa02@btinternet.com wrote:

Perhaps you could use Conditional Formatting to set the background
color Red if the value is negative?

Or in the subform's Form_AfterUpdate you could inspect the value and
run a MsgBox if negative?

-Tom.


>Hi, Everyone
>
>I've created a basic Inventory stock control system using Access 2000,
>it's a basic in and out system, however if i Recieve more than i've
>Sold, it will give me a negative Value in the text box bound to it.
>
>the text box is bound using this =[frmProductsSub].Form!UnitsOnHand
>
>The subform Sum is this =Sum(nz([intReceived])+nz([intAdjusted])-
>nz([intSold]))
>
>Is their anything i can add to this Sum or a code i can add to the
>back of the form to stop this and give a warning of some kind like a
>Message box?
>
>
>
>Thanks in advance,
>
>Kind Regards
>
>Andy

Re: =Sum(nz([intReceived])+nz([intAdjusted])-nz([intSold]))

am 02.11.2007 14:42:52 von thompsoa02

Hi Tom,

Thanks for your input,

I will give both suggestions a go,

Regards,

Andy