Can the first letter in the field automatically be capitalized?

G

Guest

When entering data into a field, can I set up a field to automatically
capitalize the first letter for me?
 
G

Guest

In the text box's AfterUpdate eventHandler, put in code along the lines of
txtMyField = UCase(Left(txtMyField,1)) & Mid(txtMyField,2)
where txtMyField is the name of the text box.

Hope This Helps
Gerald Stanley MCSD
 
G

Guest

Hi Gerald,

Thanks for your suggestion. I am not familar with "AfterUpdate
eventHandler". Is this found under properties?
TLong
 
B

Bob Howard

I think the answer might be in the input mask used on that field. Check the
HELP screen for that property and I think you'll find what's needed....
Bob.
 
F

fredg

Hi Gerald,

Thanks for your suggestion. I am not familar with "AfterUpdate
eventHandler". Is this found under properties?
TLong

In design view, display the control's property sheet.
Click on the Events tab.
On the line that says After update, write
[Event Procedure]
Then click on the button with the 3 dots that appears on that line.
When the AfterUpdate code window opens, the cursor will be flashing
between 2 already written lines of code.
Between those 2 lines, write

txtMyField = UCase(Left(txtMyField,1)) & Mid(txtMyField,2)

Change txtMyField to whatever the actual Name of that control is.
Exit.
 

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

Top