By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,667 Members | 2,611 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,667 IT Pros & Developers. It's quick & easy.

input mask

P: n/a
hello

how would i make an input mask that only makes the first letter a
capitol one?

i've been playing around and testing various masks, also tried the
wizard, but i've had no luck.

could anyone help, many thanks in advance.
Nov 12 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a
DFS
You might do better my putting some code to change the capitalization in the
Exit or AfterUpdate event:

me.txtField = ucase(left(me.txtField,1)) & lcase(mid(me.txtField,2))
"dude" <sp*******@yahoo.com> wrote in message
news:c0**************************@posting.google.c om...
hello

how would i make an input mask that only makes the first letter a
capitol one?

i've been playing around and testing various masks, also tried the
wizard, but i've had no luck.

could anyone help, many thanks in advance.

Nov 12 '05 #2

P: n/a
This quick try worked for me:

I put this as the input mask value:
?<????
This input mask is for upto five optional characters, the first one, if
entered, will be capitalized.

HTH

Mike Krous

"dude" <sp*******@yahoo.com> wrote in message
news:c0**************************@posting.google.c om... hello

how would i make an input mask that only makes the first letter a
capitol one?

i've been playing around and testing various masks, also tried the
wizard, but i've had no luck.

could anyone help, many thanks in advance.

Nov 12 '05 #3

P: n/a
See bottom of the posting

"Mike Krous" <m.krous@nospam_comcast.net> wrote in message
news:ur********************@comcast.com...
This quick try worked for me:

I put this as the input mask value:
?<????


This input mask is for upto five optional characters, the first one, if
entered, will be capitalized.

HTH

Mike Krous

"dude" <sp*******@yahoo.com> wrote in message
news:c0**************************@posting.google.c om...
hello

how would i make an input mask that only makes the first letter a
capitol one?

i've been playing around and testing various masks, also tried the
wizard, but i've had no luck.

could anyone help, many thanks in advance.



That works for me - can anyone suggest how to auto set it to Title Format
(i.e. capitalise 1st letter and any letter separated by a space!) WITHOUT
using code?

If this is not possible - what would the code (or pseudo-code) look like?
Like this pseudo-code?

string=UCase(Left$(string,1))+string
for i=2 to len(string)
IF mid$(string,i,1) = " " Then
string=left$(string,1,i)+
UCase(mid$(string,i+1,1)+mid$(string,i+2,len(strin g))
next i


Nov 12 '05 #4

P: n/a
without code would look like this. but wouldn't you want to separate this
into two fields?
?\ <????
the \ character says display the next character as a literal so I put a
space next. I must say tho, this information is readily available in the
Microsoft Help files if you press F1 in the input mask property.

HTH

Mike Krous

"Nick Marshall" <Nick Ma******@NOSPAM.COM> wrote in message
news:vs************@corp.supernews.com... See bottom of the posting

"Mike Krous" <m.krous@nospam_comcast.net> wrote in message
news:ur********************@comcast.com...
This quick try worked for me:

I put this as the input mask value:
?<????


This input mask is for upto five optional characters, the first one, if
entered, will be capitalized.

HTH

Mike Krous

"dude" <sp*******@yahoo.com> wrote in message
news:c0**************************@posting.google.c om...
hello

how would i make an input mask that only makes the first letter a
capitol one?

i've been playing around and testing various masks, also tried the
wizard, but i've had no luck.

could anyone help, many thanks in advance.



That works for me - can anyone suggest how to auto set it to Title Format
(i.e. capitalise 1st letter and any letter separated by a space!) WITHOUT
using code?

If this is not possible - what would the code (or pseudo-code) look like?
Like this pseudo-code?

string=UCase(Left$(string,1))+string
for i=2 to len(string)
IF mid$(string,i,1) = " " Then
string=left$(string,1,i)+
UCase(mid$(string,i+1,1)+mid$(string,i+2,len(strin g))
next i

Nov 12 '05 #5

P: n/a
> (i.e. capitalise 1st letter and any letter separated by a space!)
woops, sorry missed that, not just a space but letters seperated by
space....

strX = StrConv("my text proper case", vbProperCase)
(strX now equals "My Text Proper Case")

if you want mixed cases goto
http://www.mvps.org/access/strings/str0008.htm

Mike Krous
"Mike Krous" <m.krous@nospam_comcast.net> wrote in message
news:3t********************@comcast.com...
without code would look like this. but wouldn't you want to separate this
into two fields?
?\ <????


the \ character says display the next character as a literal so I put a
space next. I must say tho, this information is readily available in the
Microsoft Help files if you press F1 in the input mask property.

HTH

Mike Krous

"Nick Marshall" <Nick Ma******@NOSPAM.COM> wrote in message
news:vs************@corp.supernews.com...
See bottom of the posting

"Mike Krous" <m.krous@nospam_comcast.net> wrote in message
news:ur********************@comcast.com...
This quick try worked for me:

I put this as the input mask value:
>?<????

This input mask is for upto five optional characters, the first one, if entered, will be capitalized.

HTH

Mike Krous

"dude" <sp*******@yahoo.com> wrote in message
news:c0**************************@posting.google.c om...
> hello
>
> how would i make an input mask that only makes the first letter a
> capitol one?
>
> i've been playing around and testing various masks, also tried the
> wizard, but i've had no luck.
>
> could anyone help, many thanks in advance.


That works for me - can anyone suggest how to auto set it to Title Format (i.e. capitalise 1st letter and any letter separated by a space!) WITHOUT using code?

If this is not possible - what would the code (or pseudo-code) look like? Like this pseudo-code?

string=UCase(Left$(string,1))+string
for i=2 to len(string)
IF mid$(string,i,1) = " " Then
string=left$(string,1,i)+
UCase(mid$(string,i+1,1)+mid$(string,i+2,len(strin g))
next i


Nov 12 '05 #6

P: n/a

"Mike Krous" <m.krous@nospam_comcast.net> wrote in message
news:GM********************@comcast.com...
(i.e. capitalise 1st letter and any letter separated by a space!)

woops, sorry missed that, not just a space but letters seperated by
space....

strX = StrConv("my text proper case", vbProperCase)
(strX now equals "My Text Proper Case")

if you want mixed cases goto
http://www.mvps.org/access/strings/str0008.htm

Mike Krous

<B I G S N I P>

In the immortal words of one Homer Simpson "Doh!" - is it really that
simple? As I always tell my children, you don't know what you don't know,
because you don't know if you know it or not!!

Thanks for the hint

Nick Marshall
Nov 12 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.