Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / New Users / December 2007

Tip: Looking for answers? Try searching our database.

i can get in my mail

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Madeleine Claude - 26 Dec 2007 22:53 GMT
From: "Zanstemic" <Zanstemic@discussions.microsoft.com>
Subject: Capital First Letter
Date: Sunday, December 16, 2007 8:20 PM

I noticed that under options you can select to AutoCorrect spelling and one
of the options is to have the first letter capital.

It does not seem to be working in a field. Any suggestions on how to
properly set this up.

Thanks in advance and any help is appreciated.
John W. Vinson - 27 Dec 2007 00:03 GMT
>From: "Zanstemic" <Zanstemic@discussions.microsoft.com>
>Subject: Capital First Letter
[quoted text clipped - 7 lines]
>
>Thanks in advance and any help is appreciated.

That's not quite what this Spelling correction option does. Checking this box
will correct ZAnstemic to Zanstemic if the user types the first two letters
capitalized (maybe three or more, I'm not certain).

If you would like your Access form to convert all lower case letters To Title
Case, Like This, you can put code on the form to do it - post back with some
details of what you're doing for more information.

            John W. Vinson [MVP]
Zanstemic - 27 Dec 2007 22:14 GMT
Here are two examples that would be ideal:

1) The first letter of a specific field converting to a capital

2) The first letter in each word in a specific name field to convert to
capitals (ie. Jay A. Smith)

3) In a memo field. The first letter in the field and the first letter of a
word after a period in a sentence.

any suggestions will be helpful :)

> >From: "Zanstemic" <Zanstemic@discussions.microsoft.com>
> >Subject: Capital First Letter
[quoted text clipped - 17 lines]
>
>              John W. Vinson [MVP]
John W. Vinson - 27 Dec 2007 23:14 GMT
>Here are two examples that would be ideal:
>
>1) The first letter of a specific field converting to a capital

Use the textbox's AfterUpdate event:

Private Sub textboxname_AfterUpdate()
If Len(Me!textboxname) > 0 Then
  Me!textboxname = UCase(Left(Me!textboxname, 1) & Mid(Me!textboxname, 2)
End IF
End Sub

>2) The first letter in each word in a specific name field to convert to
>capitals (ie. Jay A. Smith)

Ummm... that's often not correct! Hans van der Hoorn and Ian MacDonald are
properly capitalized; Hans Van Der Hoorn and Ian Macdonald are not. Cathal
Macdonald might be though!

Again, use the AfterUpdate event. I check to see if the text is all lower case
and only change it if it is, trusting the user to have entered mixed case
correctly:

Private Sub textboxname_AfterUpdate()
If Len(Me!textboxname) > 0 Then
 If StrComp(Me!textboxname, LCase(Me!textboxname), 0) = 0 Then
    Me!textboxname = StrConv(Me!textboxname, vbProperCase)
 End If
End If
End Sub

>3) In a memo field. The first letter in the field and the first letter of a
>word after a period in a sentence.

ouch. VERY substantial programming, with lots and lots of special cases
(proper names in the text, periods that aren't at the end of sentences, etc.)

Train your users in the proper use of the pinky finger on each hand... <g>

            John W. Vinson [MVP]
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.