Pop up message

  • Thread starter Thread starter Gee
  • Start date Start date
G

Gee

When a certain control is 'got focus' I need a message to
pop up saying "Use Caps".
I have to do it real quick and can't remember how.
Help?
Thanks,
G
 
Use the GotFocus event of the control.
Something like this should work:

Private Sub txtMyField_GotFocus()
MsgBox "Please use all caps", _
vbInformation, "Reminder"
End Sub

Use your own control name of course.

Hope that helps,
Jeff Conrad
Bend, Oregon
 
YEP!! You're the best...I'm saved!
-----Original Message-----
Use the GotFocus event of the control.
Something like this should work:

Private Sub txtMyField_GotFocus()
MsgBox "Please use all caps", _
vbInformation, "Reminder"
End Sub

Use your own control name of course.

Hope that helps,
Jeff Conrad
Bend, Oregon




.
 
Gee said:
When a certain control is 'got focus' I need a message to
pop up saying "Use Caps".
I have to do it real quick and can't remember how.
Help?
Thanks,
G

Is this a case where you want all text entered in the control to be in
capital letters? If so, you could enforce that without bothering to
display a warning, simply by forcing the user's entry into caps. There
are several ways to do this, probably the simplest being to translate it
after entry with code in the control's AfterUpdate event:

Private Sub txtMyTextBox_AfterUpdate()

Me.txtMyTextBox = UCase(Me.txtMyTextBox)

End Sub
 
Back
Top