Easy job, but no idea for correct input mask

G

Guest

I am using Access 2003, but it's the same in XP.

I want a field what contains 2 alphabetic characters of text. And I also
want the content of this field to be in a format like this: Ab
So the first letter must be upercase and the second letter must be lowercase.

I made a text field with 2 character long size and I tried to use this input
mask:

The result of this is not correct (try it!), beacuse the input mask doesn't
convert the entered characters in the right case, and in the input box I see
3 "_" placeholders and I can enter 3 characters. If I enter the 3 possible
characters and I try to store this data, Access tells me, it won't fit in
this field beacuse it can hol only 2 characters. And that's right... but why
do I see 3 placeholders, and why doesn't convrt the input mask my entered
letters in the correct case.

The LL;;_ input mask shows only 2 placeholders, but it's still not good,
beacuse I must have the uppercase, lowercase rule.

Any idea?
 
A

Al Camp

Jack,
Why not just allow any two alpha characters, and fix them after entry.
Use your 2 alpha imput mask LL;;_
Using the AfterUpdate event of your field...
YourField = Ucase(Left(YourField,1)) & LCase(Mid(YourField,2))
 
G

Guest

Well, to tell the truth...
This is an exam excercise to solve this with the input mask. And it must be
done with input mask.
 
A

Al Camp

Jack,
I'm not sure what's going on here, but... you wrote...
Well, I did...
I set up an unbound text control on a form, and gave it an input mask of just what you
tried.
and it worked perfectly in A97 and A2003

ab, Ab, aB, AB all yielded Ab, with only two placemarkers during entry.

So, something is amiss...
Remove any formatting.
Did you, at any time, put any masking in your table design? If so, delete that field
from the table, delete it from the form, compact and repair, and put the field back in
with another name. Ex. [MaskTest] with Text 2 and nothing else. Try your original mask
again.

Still stuck? Put what we've done so far, and your question in a NEW post. Folks may
think this has been answered.

Or, if there's time, send me the file via my website below. (I have 97/2000/2003)
Indicate what form and table your using. Post back here and let me know you did that. My
spam filterss are pretty agressive on new emailers.
 
G

Guest

I also found the imput mask to accept >L<L;;;; and it returned the first
letter to be a capital and the seccond a lower case. No other exceptions were
allowed.
 
G

Guest

I have started a new MDB file from the scratch.
I made only one table in it, and only one field, with the mentoined input
mask.
So it's as simple as it can be. :)
I have sent this MDB file to you via e-mail, I hope it arrives.

The problem is the same. Letters doesn't convert to the right case and I can
see 3 placeholders using the >L<L;;_ input mask.
I have tried this in Acc2000 and Acc2003, with the same result. The Accesses
are hungarian version.
Can you see what I see in the file?

Al Camp said:
Jack,
I'm not sure what's going on here, but... you wrote...
Well, I did...
I set up an unbound text control on a form, and gave it an input mask of just what you
tried.
and it worked perfectly in A97 and A2003

ab, Ab, aB, AB all yielded Ab, with only two placemarkers during entry.

So, something is amiss...
Remove any formatting.
Did you, at any time, put any masking in your table design? If so, delete that field
from the table, delete it from the form, compact and repair, and put the field back in
with another name. Ex. [MaskTest] with Text 2 and nothing else. Try your original mask
again.

Still stuck? Put what we've done so far, and your question in a NEW post. Folks may
think this has been answered.

Or, if there's time, send me the file via my website below. (I have 97/2000/2003)
Indicate what form and table your using. Post back here and let me know you did that. My
spam filterss are pretty agressive on new emailers.
--
hth
Al Camp
Candia Computer Consulting - Candia NH
http://home.comcast.net/~cccsolutions


JackD said:
Well, to tell the truth...
This is an exam excercise to solve this with the input mask. And it must be
done with input mask.
 
A

Al Camp

Jack,
It's 11:50AM US east coast time right now. I haven't seen your email yet, and my spam
log doesn't show anything other than legit spam.

Did you use the Contact button on my website?

Zip your .mdb file, and send again.
Also...
Please send me a blank email with Subject = "Newsgroup", so I can Whitelist you. That
should get through.

At least I can get your email address that way, and can contact you offline.
--
hth
Al Camp
Candia Computer Consulting - Candia NH
http://home.comcast.net/~cccsolutions


JackD said:
I have started a new MDB file from the scratch.
I made only one table in it, and only one field, with the mentoined input
mask.
So it's as simple as it can be. :)
I have sent this MDB file to you via e-mail, I hope it arrives.

The problem is the same. Letters doesn't convert to the right case and I can
see 3 placeholders using the >L<L;;_ input mask.
I have tried this in Acc2000 and Acc2003, with the same result. The Accesses
are hungarian version.
Can you see what I see in the file?

Al Camp said:
Jack,
I'm not sure what's going on here, but... you wrote...
L<L;;_
The result of this is not correct (try it!)...

Well, I did...
I set up an unbound text control on a form, and gave it an input mask of just what
you
tried.
and it worked perfectly in A97 and A2003

ab, Ab, aB, AB all yielded Ab, with only two placemarkers during entry.

So, something is amiss...
Remove any formatting.
Did you, at any time, put any masking in your table design? If so, delete that
field
from the table, delete it from the form, compact and repair, and put the field back in
with another name. Ex. [MaskTest] with Text 2 and nothing else. Try your original
mask
again.

Still stuck? Put what we've done so far, and your question in a NEW post. Folks
may
think this has been answered.

Or, if there's time, send me the file via my website below. (I have 97/2000/2003)
Indicate what form and table your using. Post back here and let me know you did that.
My
spam filterss are pretty agressive on new emailers.
--
hth
Al Camp
Candia Computer Consulting - Candia NH
http://home.comcast.net/~cccsolutions


JackD said:
Well, to tell the truth...
This is an exam excercise to solve this with the input mask. And it must be
done with input mask.

:

Jack,
Why not just allow any two alpha characters, and fix them after entry.
Use your 2 alpha imput mask LL;;_
Using the AfterUpdate event of your field...
YourField = Ucase(Left(YourField,1)) & LCase(Mid(YourField,2))
--
hth
Al Camp
Candia Computer Consulting - Candia NH
http://home.comcast.net/~cccsolutions


I am using Access 2003, but it's the same in XP.

I want a field what contains 2 alphabetic characters of text. And I also
want the content of this field to be in a format like this: Ab
So the first letter must be upercase and the second letter must be lowercase.

I made a text field with 2 character long size and I tried to use this input
mask:
L<L;;_

The result of this is not correct (try it!), beacuse the input mask doesn't
convert the entered characters in the right case, and in the input box I see
3 "_" placeholders and I can enter 3 characters. If I enter the 3 possible
characters and I try to store this data, Access tells me, it won't fit in
this field beacuse it can hol only 2 characters. And that's right... but why
do I see 3 placeholders, and why doesn't convrt the input mask my entered
letters in the correct case.

The LL;;_ input mask shows only 2 placeholders, but it's still not good,
beacuse I must have the uppercase, lowercase rule.

Any idea?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top