When I TAB from the txtPhoneExt control of the subform (s_frmPhoneNumbers), I want the next subform (Child22) control to become the active control. And If I keep tabbing I want Child23, Child24, and then go to another subform s_Addresses. I am doing this so I will not have to hit Control Tab all the time.
Below is the code I am using:
Private Sub txtPhoneExt_Exit(Cancel As Integer)
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.MoveLast
If StrComp(Me.Bookmark, rs.Bookmark, 0) = 0 Then
Forms![s_frmPhoneNumbers1]![Child22].SetFocus
End If
End Sub
It works on the first subform going to Child22, but then I get the following error:
Runtime Error 3021:
No current record
I know I am missing something. I think it needs to loop or something until I get to the last subform, which is Child24 and then jump to s_Addresses after hitting tab, but I don’t know how to tell it to do that.
Help! Any suggestions?
Thanks!