S
scruffy
I'm trying to display the total counts of all Units that use a particular
part from inventory to show in a report using the field UCode from a query.
It works perfect when listing all individual Units but I need to get the
combined total for all the Units that use the part to show. (I always end up
with 1 showing in the report).
Ex.
UModel ' Unit Model that uses the part
UCount ' Count of each type of unit
UCode ' Unit Code used by each unit
PartNum ' Part Number
PDesc ' Part Description
UCode= 1 and UCode= 2 are listed together as UCode=17
UCode= 8 and UCode= 9 are listed together as UCode=18
The queries filter for UCode <> 17 and <> 18 and I get the results I want
however when I try to carry the totals for combined units to the report I
always get 1 for the total although I should get [Count of UCode 17] = 26 and
[Count of UCode 18] = 7.
For Each PartNum
If UCode=1 or UCode=2 then
UCount(17) = (UCount(17) +1)
End If
Next
Next PartNum
I've missed something somewhere but I'm not sure where it is...any help
would be appreciated.
scruffy
part from inventory to show in a report using the field UCode from a query.
It works perfect when listing all individual Units but I need to get the
combined total for all the Units that use the part to show. (I always end up
with 1 showing in the report).
Ex.
UModel ' Unit Model that uses the part
UCount ' Count of each type of unit
UCode ' Unit Code used by each unit
PartNum ' Part Number
PDesc ' Part Description
UCode= 1 and UCode= 2 are listed together as UCode=17
UCode= 8 and UCode= 9 are listed together as UCode=18
The queries filter for UCode <> 17 and <> 18 and I get the results I want
however when I try to carry the totals for combined units to the report I
always get 1 for the total although I should get [Count of UCode 17] = 26 and
[Count of UCode 18] = 7.
For Each PartNum
If UCode=1 or UCode=2 then
UCount(17) = (UCount(17) +1)
End If
Next
Next PartNum
I've missed something somewhere but I'm not sure where it is...any help
would be appreciated.
scruffy