If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Pulling sum of a subform to another form
I have an estimating form that shows the total time estimated for each process. Each process ( printing, cutting, packaging, etc.) is entered in a subform. Regardless of how many lines are entered the total time shows up on the estimating form. My problem is when we try to pull that time from the estimating form to our work order form. For example, if the printing subform (on the estimating form) has more than 5 lines the time shows up on the work order as zero. If it has 5 or less lines, it comes across fine. Other subforms on the estimating form work fine with 6 or 7 lines before the come across as zero. I have tried using nz([subform_name].Form!field_name,0) which works on the main estimating form and I have also tried using IIf([subform_name].Form!field_name is Null, 0, [subform_name].Form!field_name) which also works on the main estimating form. But both have the same problem when pulled to the work order form. Thank you in advance.
Daryl |
#2
|
|||
|
|||
Pulling sum of a subform to another form
----- DDarney wrote: ----- I have an estimating form that shows the total time estimated for each process. Each process ( printing, cutting, packaging, etc.) is entered in a subform. Regardless of how many lines are entered the total time shows up on the estimating form. My problem is when we try to pull that time from the estimating form to our work order form. For example, if the printing subform (on the estimating form) has more than 5 lines the time shows up on the work order as zero. If it has 5 or less lines, it comes across fine. Other subforms on the estimating form work fine with 6 or 7 lines before the come across as zero. I have tried using nz([subform_name].Form!field_name,0) which works on the main estimating form and I have also tried using IIf([subform_name].Form!field_name is Null, 0, [subform_name].Form!field_name) which also works on the main estimating form. But both have the same problem when pulled to the work order form. Thank you in advance. Daryl I should add the code behind this. There is a combo box on the work order form that is populated with the different quantities that we quoted. When one of the quantities is selected this code is run: If Me![qty to make] = Forms!new_est!q1 Then Me![Estimated Print Time] = Forms!new_est!printQ1_hours Me![Estimated Die Cut Time] = Forms!new_est!dieplotQ1_hours Me![Estimated Plotter Cut Time] = Forms!new_est!plotterQ1_hours Me![Estimated Lamination Time] = Forms!new_est!rolllamQ1_hours Me![Estimated Hand Application Time] = Forms!new_est!handlamQ1_hours Me![Estimated Punch Out Time] = Forms!new_est!punchoutQ1_hours Me![Estimated Inspection Time] = Forms!new_est!testQ1_hours Me![Estimated Packaging Time] = Forms!new_est!packageQ1_hours Me![TimeToCompleteShearCut] = Forms!new_est!shearQ1_hours There are more If's for when the other quantities are selected. Hopefully this will explain better. Daryl |
Thread Tools | |
Display Modes | |
|
|