Home > Software engineering >  VB6.0 by use of the problem
VB6.0 by use of the problem

Time:09-16

Consult everybody a great god, and to achieve, would want to use VB6.0 by use of the bundle number increase or decrease, such as goods have A01, how A02, A03. Each can be put in the position, the number of goods for a, b, c, including a, b, c values are each are given, if every goods is qualified to the position at a time to put a number of goods are goods A01 a corresponding minus one, has been reduced to 0, and then distributed to the next position how A02, by analogy, if in A01 goods put the goods are not qualified, then after artificial judgement is unqualified to a minus 1 before add back again, (because the database is put first and then determine not qualified, but this is not qualified to judge goes before the next item to determine) at this time the problem is, if how A02 trays are sentenced to scrap or A01 so the next time he points out, actually should be supply how A02, don't know what conditions make his limit on the number would be to add and subtract the amount, the great spirit guide, Text18 in this picture. The Text for quantity of the goods, A01 Text20. The Text as the quantity of the goods how A02,

CodePudding user response:

So the re-inspection - dizzy, and the number of remaining every position, waiting for inspection, the number of not to use the database? Have these two Numbers, bad judgment

CodePudding user response:

Shipment of goods purchase and nothing but,
There should be A array would be A (0 to Max), stored inside each container number of currently available
Every time replenish onr's stock, as you describe example is to 1 at a time, in fact every time give n are the same operation:
For I=0 to Max
If n & gt; A (I) then
N=n - A (I)
A (I)=0
The else
A (I)=A (I) - n
N=0
The exit for
End the if
Next
'after the cycle, to inspect whether there is not enough situation would be:
If n> 0 then msgbox "position is not enough, and" & amp; N & amp; "No place to put"

Each shipment (unqualified) was equivalent to shipment, in which position, on A (number) would be combined with the corresponding number of shipment, of course, if shipment quantity is more than goods inventory quantity you want to check,

  •  Tags:  
  • VBA
  • Related