SetFocus problem

J

jason.evans

Hi folks

I have the following code

If Me.Parent.NewRecord Then
Me.Parent.txtFolderStart.SetFocus
Me.Parent.txtFolderStart.SelStart = 0
Exit Sub
End If

When I step through this I can see the focus go to the control and the
cursor move to the start of the textbox. However, once the Exit Sub
line is run, the focus moves from the text box I have assigned it to,
to the next control which is another text box.

Any ideas greatly appreciated.
 
D

DM

What's the Exit Sub doing in there? Does it work without it? Could you give
us the rest of the code so that we can see what's in the subroutine?
 
Top