I am running an Access 2010 front end with a SQL Server backend. I have a number of form/subform scenarios with a control named LastField in the main form. The idea is to allow the operator to enter/tab through the fields on the main form and then at the end of the main form fields, pass control to the control named "Type" in the subform named sfrm_Detail. The LastField control is hidden from the operator and has an OnEnter event with code like...
Me!sfrm_Detail.SetFocus
Me!sfrm_Detail!Type.SetFocus
This logic works perfectly about 98 percent of the time. However, on occasion, the system throws a Runtime Error of...
Runtime Error; 2110 - [Database Name] can't move the focus to the control sfrm_Detail.
I have added an On Error Handler that makes 5 attempts to "Resume" before falling to the Runtime Error and this usually works (I have a audit trail for these things.) on the first re-attempt. However, on occasion, even this fails.
Has anyone else experienced this and, if so, how did you solve the problem. Thank, Eddie