C
Craig
I'm modifying an app that was developed using Access 97. The following code
generates this error:
"2455: You entered an expression that has an invalid reference to the
property form/report. The property may not exist or may not apply to the
object you specified."
**********************************
Public Function mSetForm(sParent As String, iPageCnt As Integer)
On Error GoTo Proc_Err
Dim i As Integer
Dim frm As Form
i = 0
Set frm = Forms![MyMainForm]
frm.subFrmPageTabs!txtPageCnt = iPageCnt
Proc_Exit:
Exit Function
Proc_Err:
MsgBox Err.Number & "; " & Err.Description
Resume Proc_Exit
End Function
************************************
The error occurs at the "frm.subFrmPageTabs!txtPageCnt = iPageCnt" line. I
have a subform called "subFrmPageTabs" on "MyMainForm" that has a text box
that I'm setting to a value. That's it. Have I not declared something?
What am I missing?
Thanks for any and all help.
generates this error:
"2455: You entered an expression that has an invalid reference to the
property form/report. The property may not exist or may not apply to the
object you specified."
**********************************
Public Function mSetForm(sParent As String, iPageCnt As Integer)
On Error GoTo Proc_Err
Dim i As Integer
Dim frm As Form
i = 0
Set frm = Forms![MyMainForm]
frm.subFrmPageTabs!txtPageCnt = iPageCnt
Proc_Exit:
Exit Function
Proc_Err:
MsgBox Err.Number & "; " & Err.Description
Resume Proc_Exit
End Function
************************************
The error occurs at the "frm.subFrmPageTabs!txtPageCnt = iPageCnt" line. I
have a subform called "subFrmPageTabs" on "MyMainForm" that has a text box
that I'm setting to a value. That's it. Have I not declared something?
What am I missing?
Thanks for any and all help.