hey guys,
I'm hoping someone here can help me with that elusive 'Nz" function.
Here's what I am trying to do.
I have a main form, called LIN_NOMEN.
There are 3 subforms in LIN_NOMEN:
29SUB, 31SUB and 41SUB.
each one of these subs has a total box that calculates a total.
When the user selects a LIN from LIN_NOMEN, it will link to that LIN on the sub forms and display that
record and the totals for the record.
So far so good.
Here's the hitch:
There may be a matching LIN in 1, 2 or all 3 of the subforms.
I am trying to calculate the total of the totals of the subform(s) on the main LIN_NOMEN form.
I have a text box and this is the code I have for it:
[29SUB].Form![TOTALS] + [33SUB].Form![TOTALS] + [41SUB].Form![TOTALS]
Now, if ALL 3 SUBS has a value for LIN, then it displays the correct total.
But If only one of the subs or even 2 out of three has a matching LIN (and a total in it's total column)
there it does not add them and display a total at all.
I have used the Nz function that will essentially ignore a null or "0" but it's been cut and paste and cross my fingers.
Not working now.
Can anyone tell me where to plug in the Nz and get it to work here?
Thanks for any and all help.
I'm hoping someone here can help me with that elusive 'Nz" function.
Here's what I am trying to do.
I have a main form, called LIN_NOMEN.
There are 3 subforms in LIN_NOMEN:
29SUB, 31SUB and 41SUB.
each one of these subs has a total box that calculates a total.
When the user selects a LIN from LIN_NOMEN, it will link to that LIN on the sub forms and display that
record and the totals for the record.
So far so good.
Here's the hitch:
There may be a matching LIN in 1, 2 or all 3 of the subforms.
I am trying to calculate the total of the totals of the subform(s) on the main LIN_NOMEN form.
I have a text box and this is the code I have for it:
[29SUB].Form![TOTALS] + [33SUB].Form![TOTALS] + [41SUB].Form![TOTALS]
Now, if ALL 3 SUBS has a value for LIN, then it displays the correct total.
But If only one of the subs or even 2 out of three has a matching LIN (and a total in it's total column)
there it does not add them and display a total at all.
I have used the Nz function that will essentially ignore a null or "0" but it's been cut and paste and cross my fingers.
Not working now.
Can anyone tell me where to plug in the Nz and get it to work here?
Thanks for any and all help.