I need to subtract5 pallets allready inserted.

M

Marco

Hello. I building a little access database to insert pallets.

I have a problem here.

I need to insert pallets numbers in a table with quantities but I need that
my Insert query only insert pallet number that where not already insert or
that the Total value field is diferent than zero.

Imagine, that my production number 123 has the following pallet number and
quantities:

Pallet Quantity Total
10 100 0
11 150 0
12 150 75

and my production number 456 has the following pallets number:
Pallet Quantity
12 150
10 100
14 150

In this example I need only to insert this:
Pallet Quantity
12 75
14 150

is it possible to do this?

Thanks,
Marco
 
M

Michel Walsh

The example you supplied does not seems clear, at least, it is not for me.

Where the Total columns come from? Is that supposed to be a kind of 'what is
left' when production 123 has been done, completed? If so, would you not
need to ALSO introduce a quantity of 100 for pallet 10 in order to complete
production 456?


Vanderghast, Access MVP
 
M

Marco

Hi.

What I want is to not include the pallets that were already shipped. The
Total column is the result of Pallet Quantity and Pallet Quantity Sent.

if the Total is not zero, that means that I don't sent all the quantity of
that pallet.

If it is Zero, means that all quantity was already sent.

Imagine, if I'm adding Product Lot A035, and that Lot has these pallets:
10
11
12
13

and if in previous expedition I sent the pallet 10 of lot A035 I need that
on this second expedition it appears me only these pallets:
11
12
13


I'm more clear now?

Thanks,
Marco
 
B

Bob Barrows [MVP]

Marco said:
Hello. I building a little access database to insert pallets.

I have a problem here.

I need to insert pallets numbers in a table with quantities but I
need that my Insert query only insert pallet number that where not
already insert or that the Total value field is diferent than zero.

Imagine, that my production number 123 has the following pallet
number and quantities:

Pallet Quantity Total
10 100 0
11 150 0
12 150 75

and my production number 456 has the following pallets number:
Pallet Quantity
12 150
10 100
14 150

In this example I need only to insert this:
Pallet Quantity
12 75
14 150
Please, name these tables and _show_ us what the first table is
supposed to look like after this "insert" occurs. For example, you
showed us this record in the first table:
12 150 75

Then you told us you want to insert this record:
12 75

So, after that insert, is the first table really supposed to wind up
with two records for pallet 12?
12 150 75
12 75

Or do you actually intend that an update of the original record in the
first table was supposed to occur? In which case, what should that
record look like?
 

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