Results 1 to 6 of 6
  1. #1
    esi_1981 is offline Novice
    Windows XP Access 2007
    Join Date
    Dec 2010
    Posts
    3

    how can i limit number of digits entered in the text box?

    Hi guys,

    I have a text box, which requires a 8-digit number entry.
    I want to warn the users that they are entering too much data for that field and reset the text in the text-box to the left 8 characters that were originally in there

    also I want to create a query for the users that have an 8 digit phone number and a query for the users that their names start with 'A'

    I appreciate any help/advice



    cheers

  2. #2
    ssanfu is offline Master of Nothing
    Windows 2K Access 2000
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    I have a text box, which requires a 8-digit number entry.
    One simple way is to go into design view of table. Select the text field and set the Field Size to 8. (Unless you need to do math on the number, this field should have a field type of "TEXT")


    I want to create a query for the users that have an 8 digit phone number
    Create the query, then in the criteria row under the phone number field, enter "IS NOT NULL" (without the quotes)


    and a query for the users that their names start with 'A'
    Create the query, then in the criteria row under the surname field , enter 'Like A*' (without the quotes)

  3. #3
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    And here's another method, just to keep it interesting: http://allenbrowne.com/ser-34.html

  4. #4
    esi_1981 is offline Novice
    Windows XP Access 2007
    Join Date
    Dec 2010
    Posts
    3
    Quote Originally Posted by ssanfu View Post
    One simple way is to go into design view of table. Select the text field and set the Field Size to 8. (Unless you need to do math on the number, this field should have a field type of "TEXT")
    The type of the box can not be "TEXT" because as yo said I should do some math on it. how can I generate warning message when the violation occurred?

    Thank you so much,
    Cheers.

  5. #5
    esi_1981 is offline Novice
    Windows XP Access 2007
    Join Date
    Dec 2010
    Posts
    3
    Quote Originally Posted by RuralGuy View Post
    And here's another method, just to keep it interesting: http://allenbrowne.com/ser-34.html
    Nice solution, Thank you. I want to try it now.

  6. #6
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Quote Originally Posted by esi_1981 View Post
    Nice solution, Thank you. I want to try it now.
    Have fun. Allen knows his stuff!

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Import Text File Size Limit
    By wfbp in forum Import/Export Data
    Replies: 1
    Last Post: 11-04-2010, 09:05 AM
  2. format number filed to significant digits
    By stileguru in forum Reports
    Replies: 3
    Last Post: 08-13-2010, 01:26 PM
  3. Limit number of records in report by group
    By Dr Ennui in forum Reports
    Replies: 0
    Last Post: 06-22-2010, 12:36 AM
  4. Number stored as text
    By Mclaren in forum Programming
    Replies: 1
    Last Post: 05-15-2010, 03:11 AM
  5. Concatenation of Text and Number
    By diane802 in forum Reports
    Replies: 67
    Last Post: 01-26-2010, 03:37 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums