Automatic Capitalization via VBA

stu_c

Registered User.
Local time
Today, 05:49
Joined
Sep 20, 2007
Messages
494
Hi all
I have a form with fields the user fills out, once this is done they click a button to save and close the form, in the Button I want it to automatically put the fields into the correct Capitalization, how can I do this in the VBA code?

Button name: BtnSaveNewUser (OnClick)
Field Forname: TxbForename (vbProperCase)
Field Surname: TxbSurname (vbUpperCase)

Thanks in advanced
Stu
 
you add code to the Click Event of the button, BtnSaveNewUser:
Code:
Private Sub BtnSaveNewUser_Click()
Me!TxbForename = StrConv(Me!TxbForename & "", vbProperCase)
Me!TxbSurname = UCase(Me!TxbSurname & "")
Me.Dirty = False
End Sub
 

Users who are viewing this thread

Back
Top Bottom