Also, it would be <4, not <=4, since the possible modulo are 0, 1, 2, 3
and 4, 5, 6, 7 (not 1 to 8 , but 0 to 7). But since the running sum
starts at 1, not 0, you will have to use something like:
(Me.RunningSumControl.Value - 1 ) MOD 8 < 4
in the format event of the section, since it is there that you will
hide/unhide the 'movable' textbox (setting its visibility property).
Vanderghast, Access MVP
I cannot seem to get this to work, as I do not have a running tally
yet. So, here is my SQL for my query, but the RunningTtl field does
not want to work:
SELECT tblDiscHeader.workorderNum, tblDiscHeader.workorderName,
tblDiscHeader.workorderMaterial, tblDiscHeader.workorderSerialNum,
tblDiscHeader.workorderComponent, tblProductLine.ProductName,
tblDiscrepancy.Discrepancy, tblDiscrepancy.dateDisc,
tblQualityInspectors.qualCNumber, tblQualityInspectors.qualFName,
tblQualityInspectors.qualLName, tblQualityInspectors.qualRole,
Count(tblDiscrepancy.[Discrepancy]) AS RunningTtl
FROM tblQualityInspectors INNER JOIN (tblProductLine INNER JOIN
(tblDiscHeader INNER JOIN tblDiscrepancy ON tblDiscHeader.ID =
tblDiscrepancy.workorderDisc) ON tblProductLine.ID =
tblDiscHeader.workorderProductline) ON tblQualityInspectors.ID =
tblDiscrepancy.qualDisc
WHERE (((tblDiscHeader.workorderNum)<=[workorderNum]))
GROUP BY tblDiscHeader.workorderNum, tblDiscHeader.workorderName,
tblDiscHeader.workorderMaterial, tblDiscHeader.workorderSerialNum,
tblDiscHeader.workorderComponent, tblProductLine.ProductName,
tblDiscrepancy.Discrepancy, tblDiscrepancy.dateDisc,
tblQualityInspectors.qualCNumber, tblQualityInspectors.qualFName,
tblQualityInspectors.qualLName, tblQualityInspectors.qualRole;
I am using count, but it should count 4 records and put 1, 2, 3, 4 but
does not. My assumption is that at the time the query is ran there is
only 1 record to count for the first line so it moves to the second
line and yet again only 1 line so the count is 1. I do not have any
fields that contain a number, so SUM probably will not work.
This will probably work, but I need all 8 boxes of info to show
whether they have info in them or not. So, for the first box, it
would be (running MOD 8) = 1, then place info, else null?