(Msg. 1) Posted: Thu Jul 03, 2008 5:16 pm
Post subject: Input Mask query Archived from groups: microsoft>public>access (more info?)
Hi all,
I have a textbox for telephone and fax nos. for which i added the input mask
as telephone no. (999)-(999)-(9999) (the default no., that is...) The
requirement is that if a no., say, +86-23-4455 has to be added, the format
does not alllow it and writes the no. as +86-234-455. Also, it should not
become +86-023-4455 as this becomes a different telephone no...
How do I correct this problem...As far as i undrstnd, i'll go for a do while
loop on the mask and when the appropriate condition arises, i can put the
codes..but i am unable to do that..>>> Your help will be acknowledged....
(Msg. 2) Posted: Thu Jul 03, 2008 9:17 pm
Post subject: Re: Input Mask query [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
Hi Raymond,
the InputMask,as I understand it, is applied when you enter or change
the data ...
that said, you can
1. remove the mask
2. enter data
how do you do this?
make an unbound textbox to enter a phone number with any symbols
on the AfterUpdate event, remove the mask from the phone textbox (make
sure it is defined in the form, not at the table level), place the data
in, save the record, then put the mask back
Raymond wrote:
> Hi all,
>
> I have a textbox for telephone and fax nos. for which i added the input mask
> as telephone no. (999)-(999)-(9999) (the default no., that is...) The
> requirement is that if a no., say, +86-23-4455 has to be added, the format
> does not alllow it and writes the no. as +86-234-455. Also, it should not
> become +86-023-4455 as this becomes a different telephone no...
>
> How do I correct this problem...As far as i undrstnd, i'll go for a do while
> loop on the mask and when the appropriate condition arises, i can put the
> codes..but i am unable to do that..>>> Your help will be acknowledged....
'if you want to single-step code to find error, CTRL-Break at MsgBox
'then set this to be the next statement
Resume
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
WHERE
controlname_UnboundPhone is the control NAME of your unbound phone number
Phone is the control NAME of your phone number
theoretically this should work ...
~~~~~~~~~~~
for better understanding of the basics of Access, read this:
Raymond wrote:
> Hey, i didn;t understand how we can accept the record from the user after
> disabling the mask..what's the command??/
>
> me.phonetextbox.inputmask=false
> ????????????????????????? What comes here???????????
> me.phonetextbox.inputmask=true
>
All times are: Eastern Time (US & Canada) (change)
Page 1 of 1
You can post new topics in this forum You can reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum