Re: Uppercase to Mixed Case Edit in Field

Giganews Newsgroups
Subject: Re: Uppercase to Mixed Case Edit in Field
Posted by:  gumby (david.isaac…@mail.va.gov)
Date: 8 Aug 2006

This will force the name into "Joe Smith"
Add it to the field under the afterupdate property.

Private Sub FirstName_AfterUpdate()

Me.FirstName = StrConv(FirstName, 3) ' Research StrConv Function for
more info on number to use

End Sub

Private Sub LastName_AfterUpdate()

Me.LastName = StrConv(LastName, 3) ' Research StrConv Function for
more info on number to use

End Sub

Private Sub MiddleInitial_AfterUpdate()

Me.MiddleInitial = StrConv(MiddleInitial, 3) ' Research StrConv
Function for more info on number to use

End Sub

Some code that will capitalize the first letter but not force the rest
of the letters to be lowercase.

Here it is:

Private Sub LastName_AfterUpdate()

Dim strFirstLetter As String

Dim strRightName As String

Dim strWholeName As String

strFirstLetter = Left(LastName, 1)

strRightName = Mid(LastName, 2, 49)

strWholeName = UCase(strFirstLetter) + strRightName

Me.LastName = strWholeName

End Sub

sara wrote:
> I have a table where a few of the users entered vendor names ALL IN
> UPPER CASE.  I have created forms to edit the data, but I can't seem to
> allow changing JOE SMITH to Joe Smith.
>
> What to I have to do to have the user change the name, but keep the
> key?  Overall, I think any "edits" simply add a new record, rather than
> change the existing record.
>
> The form is simple - Choose the vendor from the drop-down list.
> After Update, a new field displays:  Vendor:  [and the chosen vendor in
> the field]
>
> If the user wishes to Add a new vendor or Delete the current one, they
> choose a button on the bottom of the screen and that works just fine.
>
> The "edit" or "Change" is what doesn't work.
>
> Don't know what code to post, so I didn't post any.
>
> Thanks.
>
> Sara

Replies

In response to

Uppercase to Mixed Case Edit in Field posted by sara on 8 Aug 2006