Uppercase in Forms text box

  • Thread starter Thread starter netadmin
  • Start date Start date
N

netadmin

The problem I'm having is I have a textbox that when a
user enters data, I need the letters to automatically be
in Capital format. I have tried the following code
Strconv(Me!NameOfTextbox,vbUpperCase) what I get is a
compile error, what if anything am I missing.

Thank you
 
The problem I'm having is I have a textbox that when a
user enters data, I need the letters to automatically be
in Capital format. I have tried the following code
Strconv(Me!NameOfTextbox,vbUpperCase) what I get is a
compile error, what if anything am I missing.

Thank you

The code should be in the AfterUpdate event of the textbox; what you
see on the AfterUpdate property on the events tab should be [Event
Procedure]. Click the ... icon and edit the code to read something
like

Private Sub NameOfTextbox_AfterUpdate()
Me!NameOfTextbox = Strconv(Me!NameOfTextbox,vbUpperCase)
End Sub

replacing NameOfTextbox with whatever the name of your textbox
actually is (you can see what that name is... I can't!)
 
Back
Top