Capitalise field value

  • Thread starter Thread starter John
  • Start date Start date
In the format property of the textbox, put a >
This only works if you don't have some other code that modifies the text
after entry.

Damon
 
Put something like this in the input mask of the form or table.
CCCCCCCCCCCCCCCCCCCCC

The > converts letters to upper case.

The C's mean that any character or a space can go there. Entry is optional;
however make sure that you put in enough C's to fit the longest amount going
to be typed theere..
 
In the KeyPress event enter the following code like so :-

Private Sub YourFieldName_KeyPress(KeyAscii As Integer)
KeyAscii = Asc(UCase(Chr(KeyAscii)))
End Sub

where YourFieldName is the name of your text box control.

HTH

Peter Hibbs.
 

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

Back
Top