G
Guest
Boy I feel like a simpleton sometimes. I am working on a query (or queries,
I suspect) to calculate whether the # parts on hand is less than the # parts
required.
In the parts table, I have a field for parts required
In a different table I maintain inventory transactions (parts added, parts
used). This table is connected to the parts table by unique ID#
So, I've done a query that pulls part number, the qty required (from the
parts table) and then has an expression (parts on hand) that calculates the
parts added - parts used).
Once I have that, I want to build a query that will feed a report to
identify which parts have fewer parts on hand than required (i.e. if the
machine breaks down and you have to rebuild it, do you have enough "bolts" on
hand to build a new machine).
Well, I did a second query that uses the first one and tried to do another
expression subtracting the OnHand from the QtyRequired. And then set the
criteria to >0. A couple problems have crept up. One, as I've played
around, I get an error that this isn't part of the aggregate function (I've
tried several: Expression, Sum, Where, etc.). Also, in the first query, I
want it to drop a Zero value in to the QtyAdded - Qty Used (even if there are
no records in that table because there have been no transaction). That would
help the calculation in the second query.
Gosh, am I explaining this well at all? Can anyone help?
I suspect) to calculate whether the # parts on hand is less than the # parts
required.
In the parts table, I have a field for parts required
In a different table I maintain inventory transactions (parts added, parts
used). This table is connected to the parts table by unique ID#
So, I've done a query that pulls part number, the qty required (from the
parts table) and then has an expression (parts on hand) that calculates the
parts added - parts used).
Once I have that, I want to build a query that will feed a report to
identify which parts have fewer parts on hand than required (i.e. if the
machine breaks down and you have to rebuild it, do you have enough "bolts" on
hand to build a new machine).
Well, I did a second query that uses the first one and tried to do another
expression subtracting the OnHand from the QtyRequired. And then set the
criteria to >0. A couple problems have crept up. One, as I've played
around, I get an error that this isn't part of the aggregate function (I've
tried several: Expression, Sum, Where, etc.). Also, in the first query, I
want it to drop a Zero value in to the QtyAdded - Qty Used (even if there are
no records in that table because there have been no transaction). That would
help the calculation in the second query.
Gosh, am I explaining this well at all? Can anyone help?