Results 1 to 5 of 5
  1. #1
    Khalil Handal is offline Competent Performer
    Windows 10 Access 2003
    Join Date
    Jun 2016
    Posts
    310

    Only Text in a text field

    Hi,
    I have a text Box for names, How to allow only letters in it ?

    I have found this validation rule : Is Null OR Not Like "*[!a-z]*"
    This does not work for different languages. If I used Hebrew or Arabic alphabet it does not accept.

    So, Is there a way to have a user enter only alphabet for different languages ?



    Sincerely yours
    Khalil

  2. #2
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 10 Access 2016
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,614
    Perhaps you could use the IsNumeric() function in the forms BeforeUpdate event but I have no idea of how well it works with the Hebrew or Arabic alphabets.
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  3. #3
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    If you intend to exclude "abc123def" because of the numbers, you'd have to test character by character. You could do that during input or in the before update event.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  4. #4
    Khalil Handal is offline Competent Performer
    Windows 10 Access 2003
    Join Date
    Jun 2016
    Posts
    310
    Hi,
    Yes, it should exclude any number like mentioned. It should not have "abc123def".
    How it should be done?

    Khalil

  5. #5
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    Depends on how you want to do it. You can write a function that you call in the after update event that changes the input to exclude the numbers or use the before update event to warn the user and abort the entry. You can use the keypress event to simply exclude numbers from whatever the user is tying (numbers would simply not register, which could confuse a user, so you could add a message box).
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Replies: 24
    Last Post: 03-12-2019, 08:02 PM
  2. Replies: 4
    Last Post: 08-07-2015, 07:49 AM
  3. Replies: 7
    Last Post: 06-05-2015, 11:13 AM
  4. Replies: 12
    Last Post: 06-04-2012, 10:55 AM
  5. Replies: 2
    Last Post: 05-05-2010, 02:52 PM

Tags for this Thread

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