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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|
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 |