Change type case of data

From: Timboo (Timboo_at_discussions.microsoft.com)
Date: 02/24/05


Date: Thu, 24 Feb 2005 08:01:02 -0800

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



Relevant Pages

  • Re: Add a new record to a third table
    ... Allen Browne - Microsoft MVP. ... >> Private Sub Form_AfterUpdate ... >> Dim strSql As String ... >> literal value, change it to an Append query, switch to SQL ...
    (microsoft.public.access.formscoding)
  • Re: what is wrong with this code?
    ... > Private Sub ss_AfterUpdate ... AfterUpdate event of that control, because the current record won't have ... You can force the record to be saved by executing the ... before executing the append query -- presuming that all required fields ...
    (microsoft.public.access.forms)
  • Re: trouble with requery
    ... The on click event runs an append query and then a ... Private Sub btnExport_Click ... On Error GoTo Err_btnExport_Click ... Dim stDocName As String ...
    (microsoft.public.access.formscoding)
  • Re: Importing Tales and Columns
    ... Option Compare Database ... Private Sub BASE_Click ... Append query to append only the selected fields into your local table. ...
    (microsoft.public.access.modulesdaovba)
  • Re: Add To Table From Text Box
    ... you'll need the extra quotes ... If I have two textboxes and I want to add one of the values to one ... I have set up an append query, ... >>> Private Sub Command6_Click ...
    (microsoft.public.access.formscoding)