Randomblink
10-02-2001, 11:35 AM
Ok...
I have a database that holds data on the various projects that my department take on for the city where I live...
I have a form with two subforms...
Form.frm_Project Adjustments
subform.frm_Change_Order
subform.frm_Contract_Amendments
Ok...
The main forms holds Project data, for instance, the HVAC Construction/Repair at a Firestation...
Inside that project, there might be: Change_Orders or Contract_Adjustments...
Let's say that on the HVAC project there are two Change_Orders...each Change_Order is for a specific amount...$15,000 for one and $120,000 for the other...
What I want is for a field on the 'main' form to add this up and store it...
So in the above example...as I type in:
CHG_ORDER # CHG_ORDER $ JUSTIFICATION
----------- ------------ -------------
1 $15,000 Supplies
2 $120,000 Labor
I want a field on my main form labeled: Accumulated Change Order to automatically display and store in the database the amount of $135,000...
So, to do this, I have set the main forms On_Dirty event to do this...
Me!CHGORDAMTMN = SUM(Forms!frm_Change_Order!CHGORDAMT)
Me!AMNDMT = SUM(Forms!frm_Contract_Amendments!AMDAMT)
CHGORDAMTMN is the Accumulated Change Order field on the main form...
and AMNDMT is the Accumulated Contract Amendment field on the main form as well...
I should mention, that the subforms and related fields are in tabs on my main form...(in case that matters)
What happens now is...NOTHING...
I have changed it to the forms After_Update event with no difference...
What can I do...?
The database is huge now, with a front-end and a back-end, it runs nice, but I really want to make this work...
Thanks in advance...
I have a database that holds data on the various projects that my department take on for the city where I live...
I have a form with two subforms...
Form.frm_Project Adjustments
subform.frm_Change_Order
subform.frm_Contract_Amendments
Ok...
The main forms holds Project data, for instance, the HVAC Construction/Repair at a Firestation...
Inside that project, there might be: Change_Orders or Contract_Adjustments...
Let's say that on the HVAC project there are two Change_Orders...each Change_Order is for a specific amount...$15,000 for one and $120,000 for the other...
What I want is for a field on the 'main' form to add this up and store it...
So in the above example...as I type in:
CHG_ORDER # CHG_ORDER $ JUSTIFICATION
----------- ------------ -------------
1 $15,000 Supplies
2 $120,000 Labor
I want a field on my main form labeled: Accumulated Change Order to automatically display and store in the database the amount of $135,000...
So, to do this, I have set the main forms On_Dirty event to do this...
Me!CHGORDAMTMN = SUM(Forms!frm_Change_Order!CHGORDAMT)
Me!AMNDMT = SUM(Forms!frm_Contract_Amendments!AMDAMT)
CHGORDAMTMN is the Accumulated Change Order field on the main form...
and AMNDMT is the Accumulated Contract Amendment field on the main form as well...
I should mention, that the subforms and related fields are in tabs on my main form...(in case that matters)
What happens now is...NOTHING...
I have changed it to the forms After_Update event with no difference...
What can I do...?
The database is huge now, with a front-end and a back-end, it runs nice, but I really want to make this work...
Thanks in advance...