in access entering data with capitalized first letters only

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm trying to enter data into an Access database where only the first letter
of each word is capitalized and the rest of the word is lower case
 
Hi dbadamski,

You can use the StrConv function in the AfterUpdate event procedure of a
textbox on a form. For example, in the Northwind sample database on the
Categories form, you can use the following procedure for the CategoryName
textbox:

Option Compare Database
Option Explicit

Private Sub CategoryName_AfterUpdate()
On Error GoTo ProcError

Me.CategoryName = StrConv([CategoryName], 3)

ExitProc:
Exit Sub
ProcError:
MsgBox "Error " & Err.Number & ": " & Err.Description, _
vbCritical, "Error in CategoryName_AfterUpdate event procedure..."
Resume ExitProc
End Sub


See the following KB article for more details:
How to use the StrConv function to capitalize words and phrases
http://support.microsoft.com/?id=298607


Tom

http://www.access.qbuilt.com/html/expert_contributors.html
http://www.access.qbuilt.com/html/search.html
__________________________________________

:

I'm trying to enter data into an Access database where only the first letter
of each word is capitalized and the rest of the word is lower case
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top