Using Functions with Queries, Revisited

Sometimes, obstacles are thrown at you for which you are not prepared. Suppose that a client sent you a list of names that was input by two temps. The first temp liked to type everything in uppercase. The second temp typed everything in a combination of upper- and lowercase. After sorting and adding your own primary key, the records were shuffled like a deck of cards. Your boss wants you to find all the records that are uppercase and change them so that the first letter is uppercase and all subsequent letters are lowercase. The following function is Boolean. As you already discovered, the Boolean data type is either true or false.

 Function ChkUpper(strField As String) As Boolean Dim i As Integer, chk ...

Get Access 2002 Programming by Example now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.