Code Error

Hallo,

I have a subform called FeeDetails, which is build up of various fields, Payer_code, Session, Amount. This is build- up on a main form (StudentDetails).

I have a text box on the subform footer called txtsession1 on its control source I have =[Session]. Then I have a text box on the main form called txtsession which displays the Session from the subform.

Now, what i want to do is that there might be many sessions for one record. For example for student_ID 456745 we have 3 Sessions 2003/04, 2004/05, 2005/06. What I want to do is use a backward and forward button to be able to move towards the sessions i.e., be able to move and display on the text box on the main form 2003/04,2004/05, 2005/06 whenever the forward and backward buttons are clicked.

There are two problems here;

1) make the text box be able to understand and move from one Session to another
2) Write a VBscript on the buttons to move forward or backward the session when clicked.


Is this possible??? I am totally stranded......

Please could someone tell me how to do it...

Thank you
 
Boblarson,

I have given it a re-thought and I want it to do the following, if I am done with this I'll surely have a beautiful Christmas.....

1) I have two buttons as shown on the attachment, forward and backward buttons. And I have a session label, the text box on the main form of the session displays the first session for example 07/08 when a record is brought forward.
What i want really to do is be able to move forward and backward through the Sessions i.e., 07/08, 05/06, 03/04 when a record is displayed.

Instead of using the DoCmd.GoToRecord statement (you might need a GoToControl there too so you can position yourself on the subform). The question is how do we do this? Also, note if a session is repeated for example two payers for 07/08, it should only displays one 07/08 and to the next session.

Then, we this is sorted we can try to formulate the sum. I hope we can do it...

See attachement

many thanks
 

Attachments

Users who are viewing this thread

Back
Top Bottom