N
NeoFax
I am trying to create a query that appends records to a table based on
the remaining percent to 100%. I have records that have the percent
build complete on the last day of each month by station and
workcenter. I want to DSUM the percents of the previous months and
subtract the current months. i.e. if the current percent is 100% and
the summ of the previous was 80%, then this months percent is 20%.
Then append this value to the table as the current days percent build
complete. Here is what my table looks like:
Helo Station W/C Percent Date
14704 1STA Electrical 25 31Dec07
14704 1STA Mechanical 37 31Dec07
14704 1STA Structural 80 31Dec07
14704 2STA Mechanical 19 31Dec07
14704 2STA Structural 25 31Dec07
14705 2STA Electrical 7 31Dec07
14705 1STA Mechanical 19 31Dec07
....
14704 1STA Electrical 9 31Jan08
14704 1STA Mechanical 12 31Jan08
14704 1STA Structural 20 31Jan08
14705 1STA Electrical 12 31Jan08
My DSUM is DSUM("[Percent]","tblMonthlyUnits","[Helo#]=[Helo] and
[STATION]=[Station] and [Lead]=[W/C]"). This gives very strange
results that are not correct. If I change the right side of the
equals to actual data it works. i.e.
DSUM("[Percent]","tblMonthlyUnits","[Helo#]=14704 and [STATION]="1STA"
and [Lead]="Electrical"") I have tried everything I could think of
and nothing seems to work.
the remaining percent to 100%. I have records that have the percent
build complete on the last day of each month by station and
workcenter. I want to DSUM the percents of the previous months and
subtract the current months. i.e. if the current percent is 100% and
the summ of the previous was 80%, then this months percent is 20%.
Then append this value to the table as the current days percent build
complete. Here is what my table looks like:
Helo Station W/C Percent Date
14704 1STA Electrical 25 31Dec07
14704 1STA Mechanical 37 31Dec07
14704 1STA Structural 80 31Dec07
14704 2STA Mechanical 19 31Dec07
14704 2STA Structural 25 31Dec07
14705 2STA Electrical 7 31Dec07
14705 1STA Mechanical 19 31Dec07
....
14704 1STA Electrical 9 31Jan08
14704 1STA Mechanical 12 31Jan08
14704 1STA Structural 20 31Jan08
14705 1STA Electrical 12 31Jan08
My DSUM is DSUM("[Percent]","tblMonthlyUnits","[Helo#]=[Helo] and
[STATION]=[Station] and [Lead]=[W/C]"). This gives very strange
results that are not correct. If I change the right side of the
equals to actual data it works. i.e.
DSUM("[Percent]","tblMonthlyUnits","[Helo#]=14704 and [STATION]="1STA"
and [Lead]="Electrical"") I have tried everything I could think of
and nothing seems to work.