Hello Access experts.
I have a main unbound form frmArticle on which there is a tab control with 2 pages.
On the first page is a subform frmArticle1, on the second another subform frmArticle2.
Both subforms are bound to the same table tblArticle, and both subforms show the Recordkey Artno and the description. Apart from that, the info on both pages is different.
On the current event of subform frmArticle 1 I have following code (from Andrew Couch):
Me.Parent.frmArticle2.Form.RecordsetClone.FindFirst "Artno = '" & Me!Artno & "'"
Me.Parent.frmArticle2.Form.Bookmark = Me.Parent.frmArticle2.Form.RecordsetClone.Bookmark
On the current event of subform frmArticle2 I have the following code:
Me.Parent.frmArticle1.Form.RecordsetClone.FindFirst "Artno = '" & Me!Artno & "'"
Me.Parent.frmArticle1.Form.Bookmark = Me.Parent.frmArticle1.Form.RecordsetClone.Bookmark
When I open the main form I get the following error message : “Run-time error 2455: you entered an expression that has an invalid reference to the property Form/Report”.
The line highlighted by the debugger is the first on subform frmArticle1.
The strange thing though is that, when I click “end” on the error, the form opens and behaves correctly. Both pages update each other correctly when I navigate the subforms.
I can get rid of the error by entering “on error goto exithandler” which exithandler is situated just before the end sub. But I hate to do that without understanding what caused the error in the first place.
Thanks in advance for shedding some light, cause I can't find it.
I have a main unbound form frmArticle on which there is a tab control with 2 pages.
On the first page is a subform frmArticle1, on the second another subform frmArticle2.
Both subforms are bound to the same table tblArticle, and both subforms show the Recordkey Artno and the description. Apart from that, the info on both pages is different.
On the current event of subform frmArticle 1 I have following code (from Andrew Couch):
Me.Parent.frmArticle2.Form.RecordsetClone.FindFirst "Artno = '" & Me!Artno & "'"
Me.Parent.frmArticle2.Form.Bookmark = Me.Parent.frmArticle2.Form.RecordsetClone.Bookmark
On the current event of subform frmArticle2 I have the following code:
Me.Parent.frmArticle1.Form.RecordsetClone.FindFirst "Artno = '" & Me!Artno & "'"
Me.Parent.frmArticle1.Form.Bookmark = Me.Parent.frmArticle1.Form.RecordsetClone.Bookmark
When I open the main form I get the following error message : “Run-time error 2455: you entered an expression that has an invalid reference to the property Form/Report”.
The line highlighted by the debugger is the first on subform frmArticle1.
The strange thing though is that, when I click “end” on the error, the form opens and behaves correctly. Both pages update each other correctly when I navigate the subforms.
I can get rid of the error by entering “on error goto exithandler” which exithandler is situated just before the end sub. But I hate to do that without understanding what caused the error in the first place.
Thanks in advance for shedding some light, cause I can't find it.