Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Force an Entry

Status
Not open for further replies.

Syerston

Programmer
Jun 2, 2001
142
GB
I would like to be able to force a user to choose an option on a frame before they are able to continue. At the moment when a value is input to a text box, a message box appears advising the user to choose odd male or female. However, the form will allow the user to continue without inputing a value.

The perfect scenario would be after update on the text box the message box would appear, on OK, focus would be set on the appropriate frame. If the user then tries to move on without a value being input the message box will appear again etc.


 
I'm assuming that the male/female input is what is in the frame that you want to force to be inputted. Try this...

Private Sub [FrameName]_Exit(Cancel As Integer)

If [FrameName] = "" Then
MsgBox "[Enter Your Message Here]"
Cancel = -1
End If

End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top