Change type case of data

G

Guest

Hi, Im executing an append query to import data into a table. The imported
data source has the names in UPPER CASE and I would like to change this upon
import to Capital first letter only.

I am going to use the following code for standard data entry

Private Sub txtSurname_AfterUpdate()
If StrComp(Me!txtSurname, LCase(Me!txtSurname), 0) = 0 Then
Me!txtSurname = StrConv(Me!txtSurname, vbProperCase)
End If
End Sub

The If clause ensures that if the user correctly types "MacDonald" or
"van Slyke", the program will leave it as entered.

John W. Vinson[MVP]

- Thank you John, but as Im using an Append query, I dont think this can be
applied, any ideas welcome? Thanks Tim
 
V

Van T. Dinh

Use:

StrConv([NameField], 3)

as the source for the Name instead of simply [NameField] in your Append
Query / SQL.
 

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

Top