validation rule for text field

  • Thread starter Thread starter operations
  • Start date Start date
O

operations

I need a validation rule for test field containing first
and last names that will force the first letter of both
first and last name to upper case and all other letters to
lower case. I am learning but have not been able to figure
this out. I also need a similar validation rule to do the
same with individual test fields for each of first and last
name. Can anyone help me with this?
Thank you
Betty
 
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

You're not validating the data you're converting it. To convert names
to Proper Case use the AfterUpdate event of the TextBox:

Private Sub txtLastName_AfterUpdate()

If Not IsNull(Me!txtLastName) Then
Me!txtLastName = StrConv(Me!txtLastName, vbProperCase)
End If

End Sub

The problem w/ this is the name o'brian gets converted to O'brian not
O'Brian.

--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBQjzGS4echKqOuFEgEQLmMACg2P+G/yHH0gw/E0yxUezY8nQnkasAn1rD
IgZt1w2HpLpxZS+sVKn9DKvt
=NNzQ
-----END PGP SIGNATURE-----
 
Back
Top