[AccessD] Reorder Level

David McAfee davidmcafee at gmail.com
Wed Nov 11 14:24:19 CST 2009


I think it should be:
=IIf(([txtOnHand]+[txtOnOrder])<[ReorderLevel],[ReorderLevel]-([txtOnHand]+[txtOnOrder]),0)

Move the close parenthis from the right side of ([txtOnHand]) to the
end [txtOnOrder])
 to get 50, instead of 150

On Wed, Nov 11, 2009 at 12:13 PM, Hollis, Virginia
<hollisvj at pgdp.usec.com> wrote:
> I take that back. Something isn't right yet.
>
> Control Source of txtReorderAmt:
>
> =IIf(([txtOnHand]+[txtOnOrder])<[ReorderLevel],[ReorderLevel]-([txtOnHan
> d])+[txtOnOrder],0)
>
>
>
> I get "Item is 150 units below reorder level" when I come to a record
> that has:
>
> Reorder level = 100
>
> OnHand = 0
>
> OnOrder = 50.
>
> txtReorderAmt = 150
>
> I get "Item is 150 units below reorder level.
>
>
>
> Also, how do I have it not show if the value is 0 in txtReorderAmt? This
> gives me, "Item is 0 units below minimum level."
>
> Reorder Level = 1000
>
> OnHand = 535
>
> OnOrder = 600
>
> txtReorderAmt = 0
>
>
>
> On Current I have:
>
> If Not IsNull(Me!ReorderLevel.Value) Then 'There is a reorder level
> entered
>
>       ReorderLevel = Me!ReorderLevel.Value 'Show the value of the
> reorder level entered
>
>
>
>   If txtReorderAmt > 0 Then 'Reorder level is below.
>
> Me!ReorderLevel.ForeColor = lngRed 'reorder level is red
>
>              Me.DaysPastDue.Visible = True 'Show past due label
>
>    Else
>
>            Me!ReorderLevel.ForeColor = lngBlack 'Reorder level is not
> low, reorder level is black
>
>            Me.DaysPastDue.Visible = False 'No order label.
>
>        End If
>
>    End If
>
>
>
>
>
> From: Hollis, Virginia
> Sent: Wednesday, November 11, 2009 1:54 PM
> To: 'accessd at databaseadvisors.com'
> Subject: [AccessD] Reorder Level
>
>
>
> Oh! Never mind. I got it - added a parenthesis. Thanks!
>
>
>
> From: Hollis, Virginia
> Sent: Wednesday, November 11, 2009 1:46 PM
> To: 'accessd at databaseadvisors.com'
> Subject: [AccessD] Reorder Level
>
>
>
> I placed this in the Control Source of the text box - txtReorderAmt. I
> get an error - "the expression in the function contains the wrong number
> of arguments."
>
>
>
>
>
> *************
>
> Maybe I'm missing the point, but I believe it should be this:
>
>
>
> =IIf([txtOnHand]+[txtOnOrder])<[ReorderLevel],[ReorderLevel]-([txtOnHand
> ])+[txtOnOrder],0)
>
>
>
> =(496 + 500) < 18 ,  18 - (496 + 500) , 0
>
>
>
>  so you'd get 0 in this case.
>
>
>
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>




More information about the AccessD mailing list