A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » New Users
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Initial capital



 
 
Thread Tools Display Modes
  #1  
Old September 8th, 2005, 07:35 PM
gavin
external usenet poster
 
Posts: n/a
Default Initial capital

How would I force the first character in a text field to be a capital (in
case the use forgot to hit the CAP key)? I guess a little bit of VBA would
be required?



Regards,



Gavin


  #2  
Old September 8th, 2005, 08:51 PM
jmonty
external usenet poster
 
Posts: n/a
Default

Look in Access Help under Input Masks.
In design mode right-click on the text box and click Properties.
On the data tab place the cursor in the Input Mask field and hit F1 (help).

Read about how to manipulate the InputMask.
Try something like :
L??????????????


Hope this helps.
--
jmonty


"gavin" wrote:

How would I force the first character in a text field to be a capital (in
case the use forgot to hit the CAP key)? I guess a little bit of VBA would
be required?



Regards,



Gavin



  #3  
Old September 8th, 2005, 09:00 PM
John
external usenet poster
 
Posts: n/a
Default

If you don't mind all the characters being uppercase, you just need to put a
into the input mask field to convert all to uppercase.


JOhn

"gavin" wrote in message
...
How would I force the first character in a text field to be a capital (in
case the use forgot to hit the CAP key)? I guess a little bit of VBA would
be required?



Regards,



Gavin




  #4  
Old September 8th, 2005, 09:20 PM
gavin
external usenet poster
 
Posts: n/a
Default

Doh - I knew about input masks too!!!! I guess I was just trying to over egg
the pudding :-)

Thanks, mate!



Gavin





"jmonty" wrote in message
...
Look in Access Help under Input Masks.
In design mode right-click on the text box and click Properties.
On the data tab place the cursor in the Input Mask field and hit F1

(help).

Read about how to manipulate the InputMask.
Try something like :
L??????????????


Hope this helps.
--
jmonty


"gavin" wrote:

How would I force the first character in a text field to be a capital

(in
case the use forgot to hit the CAP key)? I guess a little bit of VBA

would
be required?



Regards,



Gavin





  #5  
Old September 8th, 2005, 09:44 PM
Vincent Johns
external usenet poster
 
Posts: n/a
Default

gavin wrote:

How would I force the first character in a text field to be a capital (in
case the use forgot to hit the CAP key)? I guess a little bit of VBA would
be required?

Regards,

Gavin


VBA isn't necessary, though it might not be a bad idea if you want to do
this on lots of different fields. But a VBA-less solution might look
like this (for the [LastName] field of a table):

SELECT Employees.FirstName, UCase$(Left$([Employees]![LastName],1))
& Mid$([Employees]![LastName],2) AS LN
FROM Employees;

However, if I were doing it, I'd define a VBA function like this:

Public Function CapMe(Name As String) As String
CapMe = UCase$(Left$(Name, 1)) & Mid$(Name, 2)
End Function

and then call it in the query; the previous query would be rewritten
this way:

SELECT Employees.FirstName,
CapMe([Employees]![LastName]) AS LN
FROM Employees;



-- Vincent Johns
Please feel free to quote anything I say here.
  #6  
Old September 9th, 2005, 06:43 AM
John Vinson
external usenet poster
 
Posts: n/a
Default

On Thu, 8 Sep 2005 21:00:13 +0100, "John"
wrote:

If you don't mind all the characters being uppercase, you just need to put a
into the input mask field to convert all to uppercase.



Well... not quite. That won't *change* what's actually stored in the
table; what it will do is *display* the data (in whatever case it
might be entered) as if it were all caps.


John W. Vinson[MVP]
  #7  
Old September 11th, 2005, 10:10 PM
John
external usenet poster
 
Posts: n/a
Default

Sorry, guilty of lazyness. What I had in my table input mask was
CCCCCCCCCCCCC.


John


"John Vinson" wrote in message
...
On Thu, 8 Sep 2005 21:00:13 +0100, "John"
wrote:

If you don't mind all the characters being uppercase, you just need to put
a
into the input mask field to convert all to uppercase.



Well... not quite. That won't *change* what's actually stored in the
table; what it will do is *display* the data (in whatever case it
might be entered) as if it were all caps.


John W. Vinson[MVP]



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Remove middle initial from "first name middle initial" Justin F. General Discussion 15 September 26th, 2005 06:13 PM
Convert to Symbols Omar Menjivar General Discussion 7 June 27th, 2005 07:32 PM
capital I capital J kapper General Discussion 3 April 19th, 2005 03:15 PM
Automatic initial capital letters chash Worksheet Functions 2 June 22nd, 2004 03:23 PM
Autocorrect Initial Capital of sentence KBS General Discussion 2 June 10th, 2004 04:48 AM


All times are GMT +1. The time now is 11:54 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.