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

Need Help. I have 2 table. 1

Status
Not open for further replies.

qazz

Programmer
Oct 6, 2002
13
0
0
PH
Need Help.

I have 2 table.

1. Employee
2. Transdata

employee transdata

empid name empid, unit, price, total
001 AAA 001 2 100 200
001 3 100 300
-----
Grandtotal 500

I want to put in the main form the Grandtotal. Once the user add/edit record on transdata on a subform, i want to update the grandtotal on the main form.

How can i do that?

Thanks!
 
gazz,

The most common way is:
1. On the subform, put a unbound textbox in the footer. Have the textbox.control source: =sum(Total).

2. On the main form, add an unbound textbox, have it's control source: =[SubFormName].[Form]![FooterTextbox]

This will update everytime the subform's 'total' field updates. You can put the subform field.visible property to False.

Good luck

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top