O
Owen
Hi,
I have a subfom on a main form and I am trying to add data from the main
form onto the subform. The code I have works, as far as adding the data, but
the cursor keeps going back to the main form after the procedure has run. I
cannot figure this one out and any help would be reatly appreciated. My code
is:
Private Sub REGWORKED_Exit(Cancel As Integer)
'Take WORKTICKETID and put it into WTLABORID
Dim strWTLABORID As String
Forms!WorkTicketAddfrm.SetFocus
Forms!WorkTicketAddfrm!WTID.SetFocus
strWTLABORID = Forms!WorkTicketAddfrm!WTID.Text
WTLABORID.SetFocus
WTLABORID.Text = strWTLABORID
OTWORKED.SetFocus
End Sub
TIA
Owen
I have a subfom on a main form and I am trying to add data from the main
form onto the subform. The code I have works, as far as adding the data, but
the cursor keeps going back to the main form after the procedure has run. I
cannot figure this one out and any help would be reatly appreciated. My code
is:
Private Sub REGWORKED_Exit(Cancel As Integer)
'Take WORKTICKETID and put it into WTLABORID
Dim strWTLABORID As String
Forms!WorkTicketAddfrm.SetFocus
Forms!WorkTicketAddfrm!WTID.SetFocus
strWTLABORID = Forms!WorkTicketAddfrm!WTID.Text
WTLABORID.SetFocus
WTLABORID.Text = strWTLABORID
OTWORKED.SetFocus
End Sub
TIA
Owen