More of a math question,but I am stuck getting a correct figure.

M

Michael

I have to get a sum of weight of the product that remains in the cooler.

I have the following,

Gross weight (PesolordoKG)
Weight of Pallet (PesoPedana)
Number of plastic bins (NColli)
Net weight (PesoNettiKG)

I have a number for the weight of the product in the cooler (incella) which
would be the (PesoNettiKG)
I have a checkbox for when the product leaves the cooler and goes into the
factory.

Sometimes all the product is not all used and returned to the cooler so I
have


Returned Gross weight (PesolordoKG2)
Returned Weight of Pallet (PesoPedana2)
Returned Number of plastic bins (NColli2)
Returned Net weight (PesoNettiKG2)


Consumed (Consumo) =[PesoNettiKG]-[PesoNettiKG2]

the problem is when I have brought back the pallet into the system, I need
to get the correct weight into the cooler. I have tried many combinations
and none seem to work. Some are correct when the return column is full like,

incella =[PesoNettiKG]-[Consumo]

but when the return column is empty that sum will give me an empty cooler
although it should show the total amount in net weight as "0" because
consumo shows the netweight minus 0 equals the netweight so it shows all the
product consumed.

I have tried many different combinations and it is always the same.. it is
correct when the return is empty but not when the return is used with some
sets of equations and the other way, correct when return is used and wrong
with not used.

I know this sound confusing, because I am confused, I thought it would be
simple. is there a way to say to use =[PesoNettiKG] or [PesoNettiKG2] which
ever is less?
thank you
michael
 
R

Ron Weiner

Michael

Sorry, I got lost in your explanation of the problem, but to answer the
question in the last paragraph of your post.

= IIf([PesoNettiKG] < [PesoNettiKG2], [PesoNettiKG], [PesoNettiKG2])

Ron W
www.WorksRite.com
 
B

Baz

Michael said:
I have to get a sum of weight of the product that remains in the cooler.

I have the following,

Gross weight (PesolordoKG)
Weight of Pallet (PesoPedana)
Number of plastic bins (NColli)
Net weight (PesoNettiKG)

I have a number for the weight of the product in the cooler (incella) which
would be the (PesoNettiKG)
I have a checkbox for when the product leaves the cooler and goes into the
factory.

Sometimes all the product is not all used and returned to the cooler so I
have


Returned Gross weight (PesolordoKG2)
Returned Weight of Pallet (PesoPedana2)
Returned Number of plastic bins (NColli2)
Returned Net weight (PesoNettiKG2)


Consumed (Consumo) =[PesoNettiKG]-[PesoNettiKG2]

the problem is when I have brought back the pallet into the system, I need
to get the correct weight into the cooler. I have tried many combinations
and none seem to work. Some are correct when the return column is full like,

incella =[PesoNettiKG]-[Consumo]

but when the return column is empty that sum will give me an empty cooler
although it should show the total amount in net weight as "0" because
consumo shows the netweight minus 0 equals the netweight so it shows all the
product consumed.

I have tried many different combinations and it is always the same.. it is
correct when the return is empty but not when the return is used with some
sets of equations and the other way, correct when return is used and wrong
with not used.

I know this sound confusing, because I am confused, I thought it would be
simple. is there a way to say to use =[PesoNettiKG] or [PesoNettiKG2] which
ever is less?
thank you
michael

Not entirely sure I follow you, but could it be that when PesoNettiKG is
first entered, then PesoNettiKG2 should be set to be the same as
PesoNettiKG? Then, Consumo = 0. Then, when the pallet goes out of the
system, PesoNettiKG2 gets set to zero. If and when a return takes place, it
gets set to whatever gets returned. Basically, PesoNettiKG is the original
weight, and PesoNettiKG2 is whatever is left in the system now (which,
obviously, starts off as being the same as PesoNettiKG).

However, I wonder if what you really want is a kind of ledger table, where
each movement is represented by a movement record e.g.

Opening Stock: +1000Kg
Delivery: -1000Kg
Return: +300Kg
Delivery: -200Kg
Stock taking adjustment: +50Kg

and so on. So, to find out what's in the cooler right now, you simply sum
all the movements.
 
M

Michael

Thanks Ron,
I have to thank you twice... once for the answer and once for making me
think.. I had asked for the wrong thing when I wrote and I was preparing a
another question to ask when in the process I figured out the answer...

thank you again
michael

=IIf([PesoNettiKG2]>0;[PesoNettiKG2];[PesoNettiKG])







Ron Weiner said:
Michael

Sorry, I got lost in your explanation of the problem, but to answer the
question in the last paragraph of your post.

= IIf([PesoNettiKG] < [PesoNettiKG2], [PesoNettiKG], [PesoNettiKG2])

Ron W
www.WorksRite.com

Michael said:
I have to get a sum of weight of the product that remains in the cooler.

I have the following,

Gross weight (PesolordoKG)
Weight of Pallet (PesoPedana)
Number of plastic bins (NColli)
Net weight (PesoNettiKG)

I have a number for the weight of the product in the cooler (incella) which
would be the (PesoNettiKG)
I have a checkbox for when the product leaves the cooler and goes into
the
factory.

Sometimes all the product is not all used and returned to the cooler so I
have


Returned Gross weight (PesolordoKG2)
Returned Weight of Pallet (PesoPedana2)
Returned Number of plastic bins (NColli2)
Returned Net weight (PesoNettiKG2)


Consumed (Consumo) =[PesoNettiKG]-[PesoNettiKG2]

the problem is when I have brought back the pallet into the system, I
need
to get the correct weight into the cooler. I have tried many combinations
and none seem to work. Some are correct when the return column is full like,

incella =[PesoNettiKG]-[Consumo]

but when the return column is empty that sum will give me an empty cooler
although it should show the total amount in net weight as "0" because
consumo shows the netweight minus 0 equals the netweight so it shows all the
product consumed.

I have tried many different combinations and it is always the same.. it
is
correct when the return is empty but not when the return is used with
some
sets of equations and the other way, correct when return is used and
wrong
with not used.

I know this sound confusing, because I am confused, I thought it would be
simple. is there a way to say to use =[PesoNettiKG] or [PesoNettiKG2] which
ever is less?
thank you
michael
 
M

Michael

Thanks baz,
I got the answer.. it was just to set the formula to say if something exist
in the return side.. use that .. but in reading your solution, you mentioned
when the pallet goes out, set another field to zero, I don't need to do that
now, but it would be helpful to know how to do it in the future.
thank you for your reply
michael


Baz said:
Michael said:
I have to get a sum of weight of the product that remains in the cooler.

I have the following,

Gross weight (PesolordoKG)
Weight of Pallet (PesoPedana)
Number of plastic bins (NColli)
Net weight (PesoNettiKG)

I have a number for the weight of the product in the cooler (incella) which
would be the (PesoNettiKG)
I have a checkbox for when the product leaves the cooler and goes into
the
factory.

Sometimes all the product is not all used and returned to the cooler so I
have


Returned Gross weight (PesolordoKG2)
Returned Weight of Pallet (PesoPedana2)
Returned Number of plastic bins (NColli2)
Returned Net weight (PesoNettiKG2)


Consumed (Consumo) =[PesoNettiKG]-[PesoNettiKG2]

the problem is when I have brought back the pallet into the system, I
need
to get the correct weight into the cooler. I have tried many combinations
and none seem to work. Some are correct when the return column is full like,

incella =[PesoNettiKG]-[Consumo]

but when the return column is empty that sum will give me an empty cooler
although it should show the total amount in net weight as "0" because
consumo shows the netweight minus 0 equals the netweight so it shows all the
product consumed.

I have tried many different combinations and it is always the same.. it
is
correct when the return is empty but not when the return is used with
some
sets of equations and the other way, correct when return is used and
wrong
with not used.

I know this sound confusing, because I am confused, I thought it would be
simple. is there a way to say to use =[PesoNettiKG] or [PesoNettiKG2] which
ever is less?
thank you
michael

Not entirely sure I follow you, but could it be that when PesoNettiKG is
first entered, then PesoNettiKG2 should be set to be the same as
PesoNettiKG? Then, Consumo = 0. Then, when the pallet goes out of the
system, PesoNettiKG2 gets set to zero. If and when a return takes place,
it
gets set to whatever gets returned. Basically, PesoNettiKG is the
original
weight, and PesoNettiKG2 is whatever is left in the system now (which,
obviously, starts off as being the same as PesoNettiKG).

However, I wonder if what you really want is a kind of ledger table, where
each movement is represented by a movement record e.g.

Opening Stock: +1000Kg
Delivery: -1000Kg
Return: +300Kg
Delivery: -200Kg
Stock taking adjustment: +50Kg

and so on. So, to find out what's in the cooler right now, you simply sum
all the movements.
 
B

Baz

Michael said:
Thanks baz,
I got the answer.. it was just to set the formula to say if something exist
in the return side.. use that .. but in reading your solution, you mentioned
when the pallet goes out, set another field to zero, I don't need to do that
now, but it would be helpful to know how to do it in the future.
thank you for your reply
michael

Hi Michael,

You would generally do this sort of thing in the BeforeUpdate event of a
form. For example:

If [product_out] Then [PesoNettiKG2] = 0

Hope that helps

Brian
 
M

Michael

yes.. thanks much
michael
Baz said:
Michael said:
Thanks baz,
I got the answer.. it was just to set the formula to say if something exist
in the return side.. use that .. but in reading your solution, you mentioned
when the pallet goes out, set another field to zero, I don't need to do that
now, but it would be helpful to know how to do it in the future.
thank you for your reply
michael

Hi Michael,

You would generally do this sort of thing in the BeforeUpdate event of a
form. For example:

If [product_out] Then [PesoNettiKG2] = 0

Hope that helps

Brian
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top