Onclick event on Subform

dr223

Registered User.
Local time
Today, 08:52
Joined
Nov 15, 2007
Messages
219
Hi,

I have a subform called FeeDetails, with one of the field called Session. Session has values as 2005/06, 2006/07, 2008/09 etc.

A record on the form may have many Session values i.e., 2005/06, 2006/07 etc.


I have a button which if clicked moves between the values i.e., 2005/06, 2006/07, etc. The code which is on the Onclick event is as follows;

Private Sub Command88_Click()

On Error GoTo Err_Command88_Click


DoCmd.OpenForm "StudentDetails1"
DoCmd.GoToControl "FeeDetails"
DoCmd.GoToControl "Session"

DoCmd.GoToRecord , , acNext

Exit_Command88_Click:
Exit Sub

Err_Command88_Click:
MsgBox Err.Description
Resume Exit_Command88_Click

End Sub


My problem is sometimes the values might be the same i.e., a record might have 2005/06, 2005/06 and 2006/07 values.
What I want is when you click the button if the values are the same, i.e., 2005/06 it jumps to the next value rather than going to the next 2005/06, then 2006/07.

Any help!!!

Thanks
 
Come on Someone should tackle this, please!!!
 

Users who are viewing this thread

Back
Top Bottom