Proper Case

  • Thread starter Thread starter Madhup Thakur
  • Start date Start date
M

Madhup Thakur

Access 2k Win98
What is the input Mask to change entries to proper ( 1st letter capitals)
case in a name field in a form. Also is there an addin / macro /module which
would modify Name field in the table to proper case.
TIA
Madhup Thakur
 
Your Answer was way too brief. If I sound complaining it is only about my
ignorance on its usage. Using it in the input mask doesnot seem to work. DO
I use it in Macro Module or vb code. I would like to thank you for your
effort though.

M. Thakur
 
I was assuming you already had a string of characters that you wanted to
convert to proper case. I'm not aware of an input mask that would work for
this.

Let's say that the user enters the string into a text box named "oldstring".
You would define an AfterUpdate event for that text box and define something
like the following VBA code behind that event. After the user enters data
in that field (and moves to another field), the following executes:

Private Sub oldstring_AfterUpdate()
On Error Resume Next
....
....
Dim newstring as String
newstring = StrConv(oldstring, vbProperCase)
....
....
End Sub

Within the above, the string variable "newstring" will contain the converted
string. You may then put that string back into the text box, store it in
the database some other way, etc. The text box may be bound or unbound as
appropriate for your application.

Bob
 
Back
Top