G
Guest
I have a text box on a form as well as an option group within a frame
containing two option buttons. I have written code to display a message box
if the user does not enter any data in the text box. I have a setfocus
statement following the closing of the msgbox but the focus goes to the the
option box. Why and how can I fix that?
Dim intMsg as Integer
IF txtDistance.text = "" Then
intMsg = MsgBox("Distance value is blank", vbOKOnly,"Invalid Entry")
txtDistance.setfocus
End If
Thank you.
containing two option buttons. I have written code to display a message box
if the user does not enter any data in the text box. I have a setfocus
statement following the closing of the msgbox but the focus goes to the the
option box. Why and how can I fix that?
Dim intMsg as Integer
IF txtDistance.text = "" Then
intMsg = MsgBox("Distance value is blank", vbOKOnly,"Invalid Entry")
txtDistance.setfocus
End If
Thank you.