Click Button To move between a field in a subform

dr223

Registered User.
Local time
Today, 09:06
Joined
Nov 15, 2007
Messages
219
Hallo,

I have a Session field on a subform.
The Session are for example, 2006/07, 2007/08, 2008/09 etc.

I have two buttons on the main form, what I want to do is,

1) When I am on a record of a student be able to click the buttons to go to the next or previous Sessions (on the subform) for a record and

2) Find the Sum of the Session for example a student had two payers for 2006/07 a) 450 dollars b) 550 dollars and for 2007/08 a)50 dollars b) 50 dollars.

So, when you press the next button or previous button to navigate on the two session, find the SUM and display it, so am expecting 2007/08 100 dollars and 2006/07 1000 dollars!!!

Any Help!!!
 
I'm guessing that you have a Students table and a Payments table. Within your sessions subform, you could have a TotPayments control whose value is a Dsum on the Amount field in the Payments table, with as many conditions as are required (e.g. "StudentID =" & Forms![MainForm]![StudentID] & " And Session =" & Me![Session]).

HTH

David
 
I have a student table and fees details subform. I have a textbox (textsession1) on the subform footer and on the control source =[Session]

Then I have a text box on the main form which has the control source =FeeDetails.Form!txtsession1

What is happening is that when I am in arecord it displays the first session displayed, what I want to do is use the forward and backward buttons to move from one session to another as displayed, however, if a session appears twice it should only display it once.

Then the next task will be to find the sum. but first things first.....


Thanks
 
What tables do you have? What query or table is the recordsource of your subform?
 

Users who are viewing this thread

Back
Top Bottom