Connecting Tech Pros Worldwide Forums | Help | Site Map

input mask

dude
Guest
 
Posts: n/a
#1: Nov 12 '05
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.

DFS
Guest
 
Posts: n/a
#2: Nov 12 '05

re: input mask


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" <spark9990@yahoo.com> wrote in message
news:c08d3427.0311300834.59f572d6@posting.google.c om...[color=blue]
> 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.[/color]


Mike Krous
Guest
 
Posts: n/a
#3: Nov 12 '05

re: input mask


This quick try worked for me:

I put this as the input mask value:[color=blue]
>?<????[/color]

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

HTH

Mike Krous

"dude" <spark9990@yahoo.com> wrote in message
news:c08d3427.0311300834.59f572d6@posting.google.c om...[color=blue]
> 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.[/color]


Nick Marshall
Guest
 
Posts: n/a
#4: Nov 12 '05

re: input mask


See bottom of the posting

"Mike Krous" <m.krous@nospam_comcast.net> wrote in message
news:urydna3BldyfCFei4p2dnA@comcast.com...[color=blue]
> This quick try worked for me:
>
> I put this as the input mask value:[color=green]
> >?<????[/color]
>
> This input mask is for upto five optional characters, the first one, if
> entered, will be capitalized.
>
> HTH
>
> Mike Krous
>
> "dude" <spark9990@yahoo.com> wrote in message
> news:c08d3427.0311300834.59f572d6@posting.google.c om...[color=green]
> > 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.[/color]
>
>[/color]

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




Mike Krous
Guest
 
Posts: n/a
#5: Nov 12 '05

re: input mask


without code would look like this. but wouldn't you want to separate this
into two fields?
[color=blue]
>?\ <????[/color]

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 Marshall@NOSPAM.COM> wrote in message
news:vspu7q8inav2be@corp.supernews.com...[color=blue]
> See bottom of the posting
>
> "Mike Krous" <m.krous@nospam_comcast.net> wrote in message
> news:urydna3BldyfCFei4p2dnA@comcast.com...[color=green]
> > This quick try worked for me:
> >
> > I put this as the input mask value:[color=darkred]
> > >?<????[/color]
> >
> > This input mask is for upto five optional characters, the first one, if
> > entered, will be capitalized.
> >
> > HTH
> >
> > Mike Krous
> >
> > "dude" <spark9990@yahoo.com> wrote in message
> > news:c08d3427.0311300834.59f572d6@posting.google.c om...[color=darkred]
> > > 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.[/color]
> >
> >[/color]
>
> 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
>
>
>
>[/color]


Mike Krous
Guest
 
Posts: n/a
#6: Nov 12 '05

re: input mask


> (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:3tednQxDWZp4-1CiRVn-iQ@comcast.com...[color=blue]
> without code would look like this. but wouldn't you want to separate this
> into two fields?
>[color=green]
> >?\ <????[/color]
>
> 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 Marshall@NOSPAM.COM> wrote in message
> news:vspu7q8inav2be@corp.supernews.com...[color=green]
> > See bottom of the posting
> >
> > "Mike Krous" <m.krous@nospam_comcast.net> wrote in message
> > news:urydna3BldyfCFei4p2dnA@comcast.com...[color=darkred]
> > > 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,[/color][/color][/color]
if[color=blue][color=green][color=darkred]
> > > entered, will be capitalized.
> > >
> > > HTH
> > >
> > > Mike Krous
> > >
> > > "dude" <spark9990@yahoo.com> wrote in message
> > > news:c08d3427.0311300834.59f572d6@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.
> > >
> > >[/color]
> >
> > That works for me - can anyone suggest how to auto set it to Title[/color][/color]
Format[color=blue][color=green]
> > (i.e. capitalise 1st letter and any letter separated by a space!)[/color][/color]
WITHOUT[color=blue][color=green]
> > using code?
> >
> > If this is not possible - what would the code (or pseudo-code) look[/color][/color]
like?[color=blue][color=green]
> > 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
> >
> >
> >
> >[/color]
>
>[/color]


Nick Marshall
Guest
 
Posts: n/a
#7: Nov 12 '05

re: input mask



"Mike Krous" <m.krous@nospam_comcast.net> wrote in message
news:GMOdnUOnXONp6VCiRVn-jg@comcast.com...[color=blue][color=green]
> > (i.e. capitalise 1st letter and any letter separated by a space!)[/color]
> 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
>[/color]
<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


Closed Thread