|
tech
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Change type case of datadata 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 Use:
StrConv([NameField], 3) as the source for the Name instead of simply [NameField] in your Append Query / SQL. -- Show quoteHTH Van T. Dinh MVP (Access) "Timboo" <Tim***@discussions.microsoft.com> wrote in message news:B69530B1-0305-4ED3-A11D-29F5F8D159EB@microsoft.com... > 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 > |
|||||||||||||||||||||||