Can't even get this to work right

G

Gator

I want to move from the FundNumber textbox on the main form to a subform.
However, if there is not a value or text in the textbox then the textbox
keeps its focus. But, what is happening is the focus is moving to the
subform when I hit tab button on the keyboard even when the control is blank.
What is wrong with this?

Private Sub FundNumber_LostFocus()
If IsNull(Me.FundNumber) Then
Me.FundNumber.SetFocus
End If
End Sub

Thanks
 
D

Dirk Goldgar

Gator said:
I want to move from the FundNumber textbox on the main form to a subform.
However, if there is not a value or text in the textbox then the textbox
keeps its focus. But, what is happening is the focus is moving to the
subform when I hit tab button on the keyboard even when the control is
blank.
What is wrong with this?

Private Sub FundNumber_LostFocus()
If IsNull(Me.FundNumber) Then
Me.FundNumber.SetFocus
End If
End Sub

Thanks


I answered your earlier post on this subject.

Please don't open multiple threads on the same subject; at least not until
sufficient time has gone by -- usually days -- that you can reasonably
conclude that no answer will be forthcoming.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top