Wrox Home  
Search P2P Archive for: Go

  Return to Index  

access thread: Forced Numbers in a Text Box


Message #1 by "enzo" <enzaux@g...> on Wed, 24 Apr 2002 04:56:01 +0800
This is a multi-part message in MIME format.

------=_NextPart_000_0008_01C1EB4C.55203320
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi guys!!

    How can I make a text box to be force to be entered only by numbers? 
 I tried using the IsNumeric command on the On keypressevent but still 
it wont work?  Am I on the right way doing it?

    How could I make a text box to accept only a certain number of 
characters?  for example I want the text box to be able to accept only 8 
characters.

Thanks,  Enzo




Message #2 by "Wesley Kendrick" <wez.k@n...> on Thu, 25 Apr 2002 00:07:11 +0100
This is a multi-part message in MIME format.

------=_NextPart_000_0129_01C1EBED.25DE80C0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi Enzo, you can do this by setting the Input Mask in the propertysheet 
for the text box.  You enter a hash (#) for each digit, for example if 
you want the box to accept only four numbers you enter ####.
Hope this helps, Wes Kendrick
  ----- Original Message -----
  From: enzo
  To: Access
  Sent: Tuesday, April 23, 2002 9:56 PM
  Subject: [access] Forced Numbers in a Text Box


  Hi guys!!

      How can I make a text box to be force to be entered only by 
numbers?  I tried using the IsNumeric command on the On keypressevent 
but still it wont work?  Am I on the right way doing it?

      How could I make a text box to accept only a certain number of 
characters?  for example I want the text box to be able to accept only 8 
characters.

  Thanks,  Enzo


Message #3 by "enzo" <enzaux@g...> on Wed, 24 Apr 2002 07:34:38 +0800
This is a multi-part message in MIME format.

------=_NextPart_000_0116_01C1EB62.7D2CE0A0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

YEEEEEEESSSSSSSS Thank you very much ur help is rght on time!!!!!

Thanks a lot!!!

Enzo :)
  ----- Original Message -----
  From: Wesley Kendrick
  To: Access
  Sent: Thursday, April 25, 2002 7:07 AM
  Subject: [access] Re: Forced Numbers in a Text Box


  Hi Enzo, you can do this by setting the Input Mask in the 
propertysheet for the text box.  You enter a hash (#) for each digit, 
for example if you want the box to accept only four numbers you enter 
####.
  Hope this helps, Wes Kendrick
    ----- Original Message -----
    From: enzo
    To: Access
    Sent: Tuesday, April 23, 2002 9:56 PM
    Subject: [access] Forced Numbers in a Text Box


    Hi guys!!

        How can I make a text box to be force to be entered only by 
numbers?  I tried using the IsNumeric command on the On keypressevent 
but still it wont work?  Am I on the right way doing it?

        How could I make a text box to accept only a certain number of 
characters?  for example I want the text box to be able to accept only 8 
characters.

    Thanks,  Enzo




Message #4 by "enzo" <enzaux@g...> on Wed, 24 Apr 2002 08:08:04 +0800
This is a multi-part message in MIME format.

------=_NextPart_000_012C_01C1EB67.290903A0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

ooops there stil a problem.........I can still enter "space" on the text 
box
  ----- Original Message -----
  From: enzo
  To: Access
  Sent: Wednesday, April 24, 2002 7:34 AM
  Subject: [access] Re: Forced Numbers in a Text Box


  YEEEEEEESSSSSSSS Thank you very much ur help is rght on time!!!!!

  Thanks a lot!!!

  Enzo :)
    ----- Original Message -----
    From: Wesley Kendrick
    To: Access
    Sent: Thursday, April 25, 2002 7:07 AM
    Subject: [access] Re: Forced Numbers in a Text Box


    Hi Enzo, you can do this by setting the Input Mask in the 
propertysheet for the text box.  You enter a hash (#) for each digit, 
for example if you want the box to accept only four numbers you enter 
####.
    Hope this helps, Wes Kendrick
      ----- Original Message -----
      From: enzo
      To: Access
      Sent: Tuesday, April 23, 2002 9:56 PM
      Subject: [access] Forced Numbers in a Text Box


      Hi guys!!

          How can I make a text box to be force to be entered only by 
numbers?  I tried using the IsNumeric command on the On keypressevent 
but still it wont work?  Am I on the right way doing it?

          How could I make a text box to accept only a certain number of 
characters?  for example I want the text box to be able to accept only 8 
characters.

      Thanks,  Enzo




Message #5 by "Leo Scott" <leoscott@c...> on Wed, 24 Apr 2002 17:28:09 -0700
This is a multi-part message in MIME format.

------=_NextPart_000_0008_01C1EBB5.66EBC560
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit

If you want to get real tough about what they can enter add some VBA code to the textboxes OnChange Event.  You can
throw away any invalid character they type as this fires with every key they type or if they paste data into the
control.  If you are going to throw away characters it is good to give the user some message to let them know when it
happens.
  -----Original Message-----
  From: enzo [mailto:enzaux@g...]
  Sent: Tuesday, April 23, 2002 5:08 PM
  To: Access
  Subject: [access] Re: Forced Numbers in a Text Box


  ooops there stil a problem.........I can still enter "space" on the text box
    ----- Original Message -----
    From: enzo
    To: Access
    Sent: Wednesday, April 24, 2002 7:34 AM
    Subject: [access] Re: Forced Numbers in a Text Box


    YEEEEEEESSSSSSSS Thank you very much ur help is rght on time!!!!!

    Thanks a lot!!!

    Enzo :)
      ----- Original Message -----
      From: Wesley Kendrick
      To: Access
      Sent: Thursday, April 25, 2002 7:07 AM
      Subject: [access] Re: Forced Numbers in a Text Box


      Hi Enzo, you can do this by setting the Input Mask in the propertysheet for the text box.  You enter a hash (#)
for each digit, for example if you want the box to accept only four numbers you enter ####.
      Hope this helps, Wes Kendrick 


Message #6 by joe.dunn@c... on Thu, 25 Apr 2002 08:56:57 +0000
For both problems, you are trying to control something at input.

Look up 'InputMask' in Access 2000 - answers to both issues are clearly

stated.
Joe



                                                                       
                 
                    "enzo"                                             
                 
                    <enzaux@g...        To:     "Access" <access@p...
rox.com>         
                    et>                  cc:                           
                 
                                         Subject:     [access] Forced N
umbers in a Text 
                    23/04/2002           Box                           
                 
                    20:56                                              
                 
                    Please                                             
                 
                    respond to                                         
                 
                    "Access"                                           
                 
                                                                       
                 
                                                                       
                 





Hi guys!!

=A0=A0=A0 How can I make a text box to be  force to be entered only by 
numbers?
I tried using the IsNumeric command  on the On keypressevent but still 
it
wont work?=A0 Am I on the right way  doing it?

=A0=A0=A0 How could I make a text box to  accept only a certain number 
of
characters?=A0 for example I want the text  box to be able to accept on
ly 8
characters.

Thanks,=A0 Enzo





*************************************************************************

This e-mail may contain confidential information or be privileged. It is intended to be read and used only by the named
recipient(s). If you are not the intended recipient(s) please notify us immediately so that we can make arrangements for its return:
you should not disclose the contents of this e-mail to any other person, or take any copies. Unless stated otherwise by an
authorised individual, nothing contained in this e-mail is intended to create binding legal obligations between us and opinions
expressed are those of the individual author.

The CIS marketing group, which is regulated for Investment Business by the Financial Services Authority, includes:
Co-operative Insurance Society Limited Registered in England number 3615R - for life assurance and pensions
CIS Unit Managers Limited Registered in England and Wales number 2369965  - for unit trusts and PEPs
CIS Policyholder Services Limited Registered in England and Wales number 3390839 - for ISAs and investment products bearing the CIS
name
Registered offices: Miller Street, Manchester M60 0AL   Telephone  0161-832-8686   Internet  http://www.cis.co.uk   E-mail
cis@c...

CIS Deposit and Instant Access Savings Accounts are held with The Co-operative Bank p.l.c., registered in England and Wales number
990937, P.O. Box 101, 1 Balloon Street, Manchester M60 4EP, and administered by CIS Policyholder Services Limited as agent of the
Bank.

CIS is a member of the General Insurance Standards Council

CIS & the CIS logo (R) Co-operative Insurance Society Limited

********************************************************************************
Message #7 by "Gregory Serrano" <SerranoG@m...> on Thu, 25 Apr 2002 13:29:03
Enzo,

<< ooops there stil a problem.........I can still enter "space" on the 
text box >>

Don't use the pound sign # for your input mask.  Instead, if you need e.g. 
four digits and they're required, use the input mask of 0000.  The mask of 
#### signifies any optional digits OR spaces whereas 0000 are four 
required digits only.

If you do use the 0000 mask, note that the user MUST enter leading zeroes, 
e.g. if the number is "0059" the user MUST enter the leading zeroes, not 
just "59" because that's only two out of the four required digits.

As for making the text box accept only eight characters, change the field 
size property to 8 in the table's design view.  Access defaults this to 50 
for text.  The max is 255.

Greg
Message #8 by "Derrick Flores" <Derrick_Flores@s...> on Thu, 25 Apr 2002 13:11:42 -0500
enzo,
  you can use the AfterUpdate Event to make sure that what's in the text 
box is a real number and prompt the user if it isn't.
Example:

Private Sub Text1_AfterUpdate()
If Me.Text1.Value <> "" Then
    Text1.Value =3D Trim(Text1.Value)
    If Not IsNumeric(Text1) Then
        MsgBox "This is not a numeric entry"
    End If
End If
End Sub

Thanks,

Derrick Flores
66318

>>> "enzo" <enzaux@g...> 04/23 7:08 PM >>>
ooops there stil a problem.........I can still enter "space" on the text 
box
  ----- Original Message -----
  From: enzo
  To: Access
  Sent: Wednesday, April 24, 2002 7:34 AM
  Subject: [access] Re: Forced Numbers in a Text Box


  YEEEEEEESSSSSSSS Thank you very much ur help is rght on time!!!!!

  Thanks a lot!!!

  Enzo :)
    ----- Original Message -----
    From: Wesley Kendrick
    To: Access
    Sent: Thursday, April 25, 2002 7:07 AM
    Subject: [access] Re: Forced Numbers in a Text Box


    Hi Enzo, you can do this by setting the Input Mask in the propertysheet
 for the text box.  You enter a hash (#) for each digit, for example if 
you want the box to accept only four numbers you enter ####.
    Hope this helps, Wes Kendrick
      ----- Original Message -----
      From: enzo
      To: Access
      Sent: Tuesday, April 23, 2002 9:56 PM
      Subject: [access] Forced Numbers in a Text Box


      Hi guys!!

          How can I make a text box to be force to be entered only by 
numbers?  I tried using the IsNumeric command on the On keypressevent but 
still it wont work?  Am I on the right way doing it?

          How could I make a text box to accept only a certain number of 
characters?  for example I want the text box to be able to accept only 8 
characters.

      Thanks,  Enzo




  Return to Index