input mask for proper case on form

S

Song Su

What's the input mask on the form to force proper case?

If user type LASTNAME, FIRSTNAME
or they type lastname, firstname

I want to convert to Lastname, Firstname

Thanks.
 
Z

zionsaal

What's the input mask on the form to force proper case?

If user type LASTNAME, FIRSTNAME
or they type lastname, firstname

I want to convert to Lastname, Firstname

Thanks.

Private Sub Text1_AfterUpdate()

Me.Text1 = StrConv(Me.Text1, vbUpperCase)

End Sub
 
Z

zionsaal

Private Sub Text1_AfterUpdate()

Me.Text1 = StrConv(Me.Text1, vbProperCase)

End Sub

sorry:

Private Sub Text1_AfterUpdate()

Me.Text1 = StrConv(Me.Text1, vbProperCase)

End Sub
 
J

John W. Vinson

can I put in on the forms property? it's a data entry form. thanks.

It's not a form property, it's VBA code. Open the form in design view; click
the ... icon by the AfterUpdate event line on the Events tab, and choose Code
Builder. Access will give you the Sub and End Sub lines, just edit one more
in:

Private Sub Text1_AfterUpdate()
Me!Text1 = StrConv(Me!Text1, vbProperCase)
End Sub

John W. Vinson [MVP]
 

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