proper text field

B

blackcat

how do i create a poper text field, i have tried entering PROPER(text) in the
format properties but this doesn't work
 
B

blackcat

thanks, i have found that, tell you to create a module using the following

Public Sub ConvertToProper()
'Test if control contains text
If IsNull(Screen.ActiveControl) = False Then
'convert text to Proper Case
Screen.ActiveControl = StrConv(Screen.ActiveControl, vbProperCase)
End If
End Sub

but now i can't attach the module to the after update event of the text box.
any idea's
 
J

Jeff Boyce

Create a procedure in the AfterUpdate event of the textbox.

Add something like:

Call ConvertToProper()

As another approach, consider running an update query against the table,
using the StrConv() function. By the way, "proper" case has some problems
you may need to clean up by hand. For example, what is the proper
capitalization of the following:

jones
jones-smith
MCDONALD
VAN DAMME
vanderwigge
obrien
o'brien

?!
 
B

blackcat

got it ! was trying to call the procedue and module by the same same. works
fine now. thanks for your help
 
Top