|
|
Converting text to proper case (Access 97/2000/2002) Like it or not, you sometimes may have to work with data that's entered completely in uppercase. Fortunately, you can change the way text is stored or displayed to use proper case. For example, you can change the name "GARY FLINTSTONE" to "Gary Flintstone". To do so, you use the StrConv() function, which can accept either a literal string or a control reference. If you're working with the function in VBA, you'd use something like: StrConv("GARY FLINTSTONE", vbProperCase) or StrConv(Me.Controls("Company"), vbProperCase) You can also use the StrConv() function in queries and controls; however, you can't use the vbProperCase constant. Instead, you must use the numeric value that the constant represents--3. Let's say that you want to convert data from a field called Address and display it in a textbox control on a report. To show the converted data, you'd add a textbox control to the report and then change the control's Control Source property to: =StrConv([Address],3)
|