THANK YOU very much for everyone who posted!!!
Wayne's post provided me with the solution I needed.
Again, I appreciate everyone's time and effort.
Best Regards,
Chris vettese
Wayne Gillespie <bestfit@NObestfitsoftwareSPAM.com.au> wrote in message news:<e1r220hd3399f95nir9uliismonk8f7nqv@4ax.com>. ..[color=blue]
> On 4 Feb 2004 13:23:25 -0800,
chrisvettese@yahoo.com (chris vettese) wrote:
>[color=green]
> >I can not bring the calculation to the main form. There has to be a
> >way to do this. What about HasData? Is there a way I can use this
> >in a form?
> >
> >
> >Chris
> >
> >Bas Cost Budde <bas@heuveltop.org> wrote in message news:<bvots4$r6q$4@news2.solcon.nl>...[color=darkred]
> >> chris vettese wrote:
> >>
> >> >>>=nz(forms![PARENTFORMNAME]![chldFormObjectName]![FieldReferenced],0)[/color][/color]
>[color=green][color=darkred]
> >> >>=nz(forms![PARENTFORMNAME]![chldFormObjectName].Form![FieldReferenced],0)
> >>
> >> I understand why Nz doesn't help you out--if there are no records, there
> >> is no subform control present to refer to. No amount of Null checking
> >> will help.
> >>
> >> Is it possible to lift the calculation out of the subform? Into the main
> >> form control, that is.[/color][/color]
>
> Create a custom function that first checks for the existance of records in the subform. If records exist return the total else return 0.
>
> Something like -
>
> Function fGetTotal()
>
> With Me.frmNameOfSubform.Form.RecordsetClone
> IF .RecordCount<>0 Then
> fGetTotal=Me.frmNameOfSubform.Form!NameOfTotalsCon trol
> Else
> fGetTotal=0
> End IF
> End With
>
> Exit Function
>
> Set the ControlSource of the control on your main form to =fGetTotal()
>
> Wayne Gillespie
> Gosford NSW Australia[/color]