PC Review


Reply
Thread Tools Rate Thread

Automatic Refill!!!

 
 
=?Utf-8?B?a2VubnlrZWU=?=
Guest
Posts: n/a
 
      28th May 2005
I got two text box namely : [Amount] and [Balancer]

Relationship
[Amount] + [Balancer] >= 0

The value [Amount] will reduce everyday until zero. Then, I need the
[Balancer] to automatically increase its value to prevent negative condition
occurs.

eg.
Let say i am a fruit storkeeper
[Amount] increases when i add in "banana" stock but [Amount] cannot be
negative if [Amount] run out of stock.

Hence, what code can automatically make the value of [Balance] to increase
so it can add into [Amount] to prevent [Amount] from being negative.

Data entry==>[Balancer]+[Amount]==>[Amount]==>positive value

eg
Data entry = -20
Automatically [Balancer] = 20
[Amount] = 0 (it will always more or equal to zero)


Any solutions?

Thanks in advance.

Kennykee
 
Reply With Quote
 
 
 
 
George Nicholson
Guest
Posts: n/a
 
      28th May 2005
1) You are using Amount in 2 different ways: as the amount entered and the
result of Entry + Balancer. It can't be both.
2) Not sure under what circumstances a fruit storekeeper would ever
enter -20, but here's your answer:

In AmountEntry_AfterUpdate:
if AmountEntry < 0 then
Balancer = abs(AmountEntry)
else
Balancer = 0
end if

--
George Nicholson

Remove 'Junk' from return address.


"kennykee" <(E-Mail Removed)> wrote in message
news:6D2391CE-EB48-4BC7-9AE2-(E-Mail Removed)...
>I got two text box namely : [Amount] and [Balancer]
>
> Relationship
> [Amount] + [Balancer] >= 0
>
> The value [Amount] will reduce everyday until zero. Then, I need the
> [Balancer] to automatically increase its value to prevent negative
> condition
> occurs.
>
> eg.
> Let say i am a fruit storkeeper
> [Amount] increases when i add in "banana" stock but [Amount] cannot be
> negative if [Amount] run out of stock.
>
> Hence, what code can automatically make the value of [Balance] to increase
> so it can add into [Amount] to prevent [Amount] from being negative.
>
> Data entry==>[Balancer]+[Amount]==>[Amount]==>positive value
>
> eg
> Data entry = -20
> Automatically [Balancer] = 20
> [Amount] = 0 (it will always more or equal to zero)
>
>
> Any solutions?
>
> Thanks in advance.
>
> Kennykee



 
Reply With Quote
 
Ken Snell [MVP]
Guest
Posts: n/a
 
      28th May 2005
"kennykee" <(E-Mail Removed)> wrote in message
news:6D2391CE-EB48-4BC7-9AE2-(E-Mail Removed)...
>
> eg.
> Let say i am a fruit storkeeper



Hmmm.....now this is really starting to look like a homework
problem....."let's say"? I would think that you'd "know"?
--

Ken Snell
<MS ACCESS MVP>


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Samsung Laser Refill Problem, HP 1018 any better for refill? lbbss Printers 10 12th Oct 2007 10:37 AM
Minolta 2300DL Still looking for actual toner refill experiences refill Tom Printers 1 4th Nov 2005 06:27 PM
what about hp refill? Giuseppe Printers 7 4th Jun 2004 01:55 AM
now anyone a good compatible refill kit or refill ink for HP designjet 100 zegrea Printers 1 19th Aug 2003 08:15 PM
Re: To refill or not to refill... koppee1 Printers 3 3rd Jul 2003 02:26 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:05 PM.