Rocky Smolin
rockysmolin at bchacc.com
Tue Feb 5 09:50:52 CST 2013
On 2/5/2013 12:18 AM, Rocky Smolin wrote: > So a client has an app into which I copied, into the front end, a zip > code table but all the cities are in upper case. So when he puts in a > zip code and the CBF in the after update event of the zip code combo > box retrieves the city, it's in upper case. > > So of course, he'd like it to appear in lower case with initial caps. > I thought about converting the cities (some of which are two words) > with some parsing code then discovered StrConv. Yes, just when I > think I've seen every built-in of VBA up pops a new one (on me anyway) > - found this by Googling the obvious "access vba make field lower case with caps". > Conversion Type 3 is exactly what he wanted. One update query - less > than a minute and table's perfectly converted to lower case with > initial caps. > > Hopefully someone will find this useful. > > Best, > > Rocky Smolin > Beach Access Software > 858-259-4334 > www.bchacc.com <http://www.bchacc.com/> www.e-z-mrp.com > <http://www.e-z-mrp.com/> > Skype: rocky.smolin > > > Using the StrConv function > > > For those of you who have never used the StrConv function, it does > need a bit of explaining. The StrConv function allows you to convert a > string to a specified conversion setting such as uppercase, lowercase, > or proper case. > For example, StrConv("my text",3) would be converted to proper case, > reading "My Text". > > > > Here is the basic syntax: > > > StrConv(Target String, Conversion Type) > > > > > Target String is the string to be converted. In a query environment, > you can use the name of a field to specify that you are converting all > the row values of that field. > > Conversion type specifies how to convert the string. The following > constants identify the conversion type. > > 1 - Converts the string to uppercase characters. > > 2 - Converts the string to lowercase characters. > > 3 - Converts the first letter of every word in string to uppercase. > > _______________________________________________ > dba-OT mailing list > dba-OT at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-ot > Website: http://www.databaseadvisors.com > _______________________________________________ dba-OT mailing list dba-OT at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-ot Website: http://www.databaseadvisors.com _______________________________________________ dba-OT mailing list dba-OT at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-ot Website: http://www.databaseadvisors.com