B
Brian Morris
Hi,
I have a 2000 MDB that is giving a strange problem when it is run under
Access2002/XP (full version) on Win2000/XP. If I run the 2000 MDB under
Access2000 I don't get the problem. I have a main form with 2 subforms and
from within an update event of subformA I want to set the focus to subformB.
In Access2000 I do the following and it works fine but not in AccessXP it
gives an error
Private Sub subfromATxtBox_AfterUpdate()
Parent!subfrmB.SetFocus
End Sub
Also whenever I add a new record in subformA I change the recordsource of
subformB by
Parent!subfrmB.Form.RecordSource = "SELECT * FROM tmpApprLoanPieces WHERE
(PartNo = " & Me.txtPartNo & ");"
the error...
Run-time error 3011
The expression After Update you entered as the event property setting
produced the following error: The Microsoft jet database engine could not
find the object ~sq_fsubfrmB. Make sure the object exists and that you spell
its name and the path name correctly. The expression may not result in the
name of a macro, the name of a user-defined function or [Event Procedure],
There may have been an error evaluating the function, event or macro.
When the error message comes up, I trap it and ask the user to press ok and
it does eventually give the focus to the subform and everything appears to
be ok but I don't want to leave it like this.
I tried converting to 2002 format and recompiling but that did not help.
I've turned off the Name AutoCorrect and recompacted and if tried
Forms!ParentFormName!subformB.SetFocus instead of
Parent!subfrmB.SetFocus but I get the same result.
Forgive my repost.
Thanks
Brian
I have a 2000 MDB that is giving a strange problem when it is run under
Access2002/XP (full version) on Win2000/XP. If I run the 2000 MDB under
Access2000 I don't get the problem. I have a main form with 2 subforms and
from within an update event of subformA I want to set the focus to subformB.
In Access2000 I do the following and it works fine but not in AccessXP it
gives an error
Private Sub subfromATxtBox_AfterUpdate()
Parent!subfrmB.SetFocus
End Sub
Also whenever I add a new record in subformA I change the recordsource of
subformB by
Parent!subfrmB.Form.RecordSource = "SELECT * FROM tmpApprLoanPieces WHERE
(PartNo = " & Me.txtPartNo & ");"
the error...
Run-time error 3011
The expression After Update you entered as the event property setting
produced the following error: The Microsoft jet database engine could not
find the object ~sq_fsubfrmB. Make sure the object exists and that you spell
its name and the path name correctly. The expression may not result in the
name of a macro, the name of a user-defined function or [Event Procedure],
There may have been an error evaluating the function, event or macro.
When the error message comes up, I trap it and ask the user to press ok and
it does eventually give the focus to the subform and everything appears to
be ok but I don't want to leave it like this.
I tried converting to 2002 format and recompiling but that did not help.
I've turned off the Name AutoCorrect and recompacted and if tried
Forms!ParentFormName!subformB.SetFocus instead of
Parent!subfrmB.SetFocus but I get the same result.
Forgive my repost.
Thanks
Brian