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

How to get sum of field from one form to another.

Status
Not open for further replies.

sk1hotpepr

Technical User
Jul 11, 2003
63
US
I have a tabbed form that I want to be able to use information from one tab to populate a textbox on another tab. I have on the first form a listing of all contracts with their bid. The second form needs the sum of all contract bids shown. What is the best way to do this? I tried creating an textbox in the footer of the first form for the sum and set visible to "off" but am not sure of how to get that information over to the second form textbox. Any help would be greatly appreciated!
 
forms!form2!textbox=forms!form1!invisibletextbox

I think that will do it. Not 100% sure. The text box on form 2 should have its recordsource set to the above...I think.

Or either put the above in the on click event of a button on form 1 if that applies.
 
Thanks for that link, it's a good one to keep for reference. I added that field to my query as a "sum" grouping which worked well without having to go through much coding. It was easier than trying to reference the field from a different tab. I'm not sure which is better performance-wise though. I'll have to try it both ways...

thanks again!
 
i would think the sum in the query has a better performance, but that is just a thought.

Pampers.

You're never too young to learn
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top