Requery error when using a MS Access 2k designed db app with 2k3 &

S

Sryn

Hi all,

I'm continuing development on a school database originally done on MS Access
2000. 2K is still my main development environment. However, the database is
now mostly used with 2k3 and 2k7 Office environments.

I've got this main form with three subforms:
Subform1 lets the user choose the student from a list of students.
Subform2 shows the attendance details associated with the chosen student in
Subform1.
Subform2 shows the subject mark details associated with the chosen student
in Subform1.

Subform1 has an OnCurrent macro that requries both Subform2 and Subform3.
It is as attached below.

Problem is, that code works in 2k but won't on 2k3 nor 2k7. I know this as
I've already commented out both offending lines and the error dialog box that
popped-up upon opening the form didn't appear again after the commented-out
operation.

I've done some help and online search but it seems my Access knowledge is
limited and I don't know how to phrase for help, nor understand fully what
I'm reading. This matter is also kind of urgent.

If anybody can suggest a solution or a work-around, I'll be much obliged.
Thank you very much in advance.

-----
Sryn

//
VERSION 1.0 CLASS
BEGIN
MultiUse = -1 'True
END
Attribute VB_Name = "Form_frm2008M1Classes Student subform"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Compare Database

Sub Form_Current()

Dim ParentDocName As String

On Error Resume Next
ParentDocName = Me.Parent.Name

If Err <> 0 Then
GoTo Form_Current_Exit
Else
On Error GoTo Form_Current_Err
Me.Parent![t_Marks subform1].Requery ' 1st offending line
Me.Parent![t_SubjectMarks2 subform].Requery '2nd offending line
End If

Form_Current_Exit:
Exit Sub

Form_Current_Err:
MsgBox Error$
Resume Form_Current_Exit

End Sub
//
 
Top