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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Display Query Results

Status
Not open for further replies.

seashore67

Technical User
May 27, 2003
51
US
I have a query that obtains the sum of one of my fields. Is there a way to have a command button display that result in either a text box or label on a form.

Thanks,
Andrew
 
Create a text box on your form and make its control source that of the sum field in the query. In order for the text box to appear as something else, change its properties

HTH

An investment in knowledge always pays the best dividends.
by Benjamin Franklin
Autonumber Description - FAQ702-5106
 
When I attempt to do this it gives me #Name? within the textbox. Thanks for your help.
 
Can you post your formula that sums and where exactly in the query it is located???

When you open the query, do you get a sum figure in the field you created?

You could do this in the text box on the form by putting your formula in the control source.


An investment in knowledge always pays the best dividends.
by Benjamin Franklin
Autonumber Description - FAQ702-5106
 
I receive #Error when I put this code into the control source:
=Sum([November].[PAID])

Is this an incorrect summation of a column within my table?

Thanks,
Andrew
 
Have you tried this ?
=DSum("PAID", "November")

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Andrew,
I think I see some of your problem.
Is November the name of the field or the name in the field?
Same applies to Paid.

Try looking up DSum in help.

An investment in knowledge always pays the best dividends.
by Benjamin Franklin
Autonumber Description - FAQ702-5106
 
PHV, it works great. Thanks for all your help guys. This makes my life a lot easier. Once again tek-tips comes to my rescue!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top