damaruk,
the following examples are all done in the immediate window w/ Ms Access 97:
Mystr = "michael l red"
? StrConv(MyStr, vbProperCase)
Michael L Red
mystr = "michael l red jr"
? strconv(mystr, vbProperCase)
Michael L Red Jr
MyStr = "michael l red iii"
? strconv(Mystr, vbProperCase)
Michael L Red Iii
As you can see from the lase example, there can be some problems in using this approach. David D's example appears to be taken from a query (syntax), however the equivalent would work for a form control (text box) placed in the correct event.
You need to be a little careful. Placing it "bare" in an after update event will cause an endless loop, because each after update will cause an update, which will call the after update .... soon to run out of memory ...., so you would first need to check wheather the entry was already proper.
Also, the norm /default for Ms Access is "option compare database", which defeats a direct comparision based on case sensitivity (AAAA = aaaa)? so your inital test needs to use an additional function - StrComp - Below is a sample which "works" in the after update event, with the problems noted above (e.g. changing iii to Iii) unresolved. Note that the list of exceptions in putting proper names in "Proper" format appears to be essientially infinite. In one previous lifetime, I maintained a modest database of ~~ 1000 records w/ "Proper names" in two or three fields. I did a "roll my own version of the strconv - proper, which worked very much like it - the exceptions counted out to almost 100 seperate instances where "Proper" did not return the "correct" capitalization.
Private Sub txtPublisher_AfterUpdate()
If (StrComp(txtPublisher, StrConv(txtPublisher, vbProperCase), 0)) Then
txtPublisher = StrConv(txtPublisher, vbProperCase)
End If
End Sub
[sig]<p>MichaelRed<br><a href=mailto:mred@duvallgroup.com>mred@duvallgroup.com</a><br>There is never time to do it right but there is always time to do it over[/sig]