Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calculated fields in report

Status
Not open for further replies.

Sloaner

Technical User
Jun 21, 2004
39
US
I have a form with a label whose value is being passed in from a form(LabelA). There's also a textbox which is a calculated control(Label G). I need to know how to set another textbox as the difference of the 2.
So far I have the textbox controlsource as
=([LabelA]- [LabelG])
which gives the following error on the report
#error

I already have the value for LabelA and LabelG printed correctly on the report. LabelG is also a calculated textbox whose controlsource is
Code:
 =Sum([Forms]![Accountability Main]![FPrompt])+[LabelD]+[LabelE1]

where labelD and labelE1 are textboxes(I'm not sure if this makes a difference).

As I've mentioned above I need help setting another textbox as the difference of the 2.

Suggestions anyone
 
I don't believe there is any easy way to do calculations based on label controls. Use text boxes for calcs.

Duane
MS Access MVP
Find out how to get great answers faq219-2884.
 
You need to use:

=([labelA].[Caption]*1)+([labelG].[Caption]*1)

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top