Rabu, 04 April 2012

[MS_AccessPros] Re: Reference a suform in a report

 

IMO, don't use a control source in a report that depends on a control in a form. Those numbers from the control on the form must come from data and calculations from records in your tables. Use the tables rather than the controls.

Duane Hookom
MS Access MVP

--- In MS_Access_Professionals@yahoogroups.com, Art Lorenzini <dbalorenzini@...> wrote:
>
> Bill,
> I can take it, call me and idiot! I had the field names wrong!
>  
> =Nz([Forms]![frmWorkOrderDetails]![sfrmWorkorderParts]![Total Parts])+Nz([Forms]![frmWorkOrderDetails]![sfrmWorkorderLabor]![Total Labor])
>  Thanks for all your help!
>
>
> With warm regards,
>
> Arthur Lorenzini
> Sioux Falls, South Dakota
>
>
>
>
>
>
> ________________________________
> From: Bill Mosca <wrmosca@...>
> To: MS_Access_Professionals@yahoogroups.com
> Sent: Wednesday, April 4, 2012 4:14 PM
> Subject: [MS_AccessPros] Re: Reference a suform in a report
>
>
>
>  
>
> Art
>
> Try this way:
> [Forms]![frmWorkOrderDetails]![sfrmWorkorderParts]![Parts Total]
>
> Regards,
> Bill Mosca, Founder - MS_Access_Professionals
> http://www.thatlldoit.com
> Microsoft Office Access MVP
> https://mvp.support.microsoft.com/profile/Bill.Mosca
>
> --- In MS_Access_Professionals@yahoogroups.com, "Art" <dbalorenzini@> wrote:
> >
> > I have a a main form called frmWorkDetails which has to subforms called sfrmWOParts and sfrmWOLabor. On sfrmWOLabor there is a txtbox called [Labor Total] and on sfrmWOParts there is a textbox called [Parts Total]
> >
> > I am trying to reference the two fields in my report. The frmWorkDetails is open when I run the report but I get a #Type error in my txtTotal textbox on my report.
> >
> > Expression in the txtTotal box is:
> >
> > =Nz([Forms]![frmWorkOrderDetails]![sfrmWorkorderParts].[Form]![Parts Total])+Nz([Forms]![frmWorkOrderDetails]![sfrmWorkorderLabor].[Form]![Labor Total])
> >
> > What am I doing wrong?
> >
> > Thanks,
> >
> > Art Lorenzini
> > Sioux Falls, SD
> >
>
>
>
>
> [Non-text portions of this message have been removed]
>

__._,_.___
.

__,_._,___

Tidak ada komentar:

Posting Komentar