Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

Alpha, but no chars

Discussion in 'Information Technology' started by - Alex, Jul 28, 2006.

Tags:
  1. - Alex

    - Alex
    Expand Collapse
    Guest

    Hello

    I am woking on a log on program in Access and Having trouble with the
    interface to add new users. I use a list box to show them and a seperate From
    to add new users. Now it work fine, but when I add a user that has a
    charichter in it, come of them blow it up quite nicley, such as ' " , ; | \ !
    all either throw off my index on the Listbox, or group all the records
    together thinking there the same.

    I would use Input masks but (beside the fact that there ugly) I need some of
    the chars in there such a ^ and ~ (which don't explode the program). what I
    need is some form of Is letter fucntion, but can't find such a thing to
    exisist in Access.

    If anyone knew of such a function that would be grand.
     
  2. Loading...

    Similar Threads Forum Date
    Learn Punjabi The Creation of Gurmukhi Alphabets Language, Arts & Culture Dec 30, 2012
    Learn Punjabi Learn Gurmukhi - The Punjabi Alphabets Language, Arts & Culture Sep 16, 2009
    Learn Punjabi Gurmukhi Alphabet, Handwriting, from Billie Grosse the Font-maker Language, Arts & Culture Jul 15, 2009
    Learn Punjabi Gurmukhi Alphabet, Practice Tips, from Billie Grosse the Font-maker Language, Arts & Culture Jul 15, 2009
    Learn Punjabi Gurmukhi Alphabet, Additional Sounds, from Billie Grosse the Font-maker Language, Arts & Culture Jul 15, 2009

  3. kerry_ja@yahoo.com

    kerry_ja@yahoo.com
    Expand Collapse
    Guest

    That would be easy to create:

    Function IsLetter(ValueToTest As Variant) As Boolean
    Dim intLength As Integer 'The length of the input
    Dim intPosition As Integer 'The position of the character to check

    Rem if there is nothing input, then there are no letters
    If IsNull(ValueToTest) Then
    Let IsLetter = False
    Exit Function
    End If
    Let intLength = Len(ValueToTest)
    Rem if there is a zero length string input, then there are no
    letters
    If intLength = 0 Then
    Let IsLetter = False
    Exit Function
    End If
    Rem Check each charachter
    For intPosition = 1 To intLength
    Select Case Asc(Mid(ValueToTest, intPosition, 1))
    Case 65 To 90 'UpperCase Letter
    Let IsLetter = True
    Case 97 To 122 'Lower Case Letter
    Let IsLetter = True
    Case Else
    Rem if there are any which are not then set to false
    and exit
    Let IsLetter = False
    Exit Function
    End Select
    Next intPosition
    End Function

    - Alex wrote:
    > Hello
    >
    > I am woking on a log on program in Access and Having trouble with the
    > interface to add new users. I use a list box to show them and a seperate From
    > to add new users. Now it work fine, but when I add a user that has a
    > charichter in it, come of them blow it up quite nicley, such as ' " , ; | \ !
    > all either throw off my index on the Listbox, or group all the records
    > together thinking there the same.
    >
    > I would use Input masks but (beside the fact that there ugly) I need some of
    > the chars in there such a ^ and ~ (which don't explode the program). what I
    > need is some form of Is letter fucntion, but can't find such a thing to
    > exisist in Access.
    >
    > If anyone knew of such a function that would be grand.
     
  4. - Alex

    - Alex
    Expand Collapse
    Guest

    Thanks this solves that I'll just have to thow in cases for the Charichters I
    need to allow

    "kerry_ja@yahoo.com" wrote:

    > That would be easy to create:
    >
    > Function IsLetter(ValueToTest As Variant) As Boolean
    > Dim intLength As Integer 'The length of the input
    > Dim intPosition As Integer 'The position of the character to check
    >
    > Rem if there is nothing input, then there are no letters
    > If IsNull(ValueToTest) Then
    > Let IsLetter = False
    > Exit Function
    > End If
    > Let intLength = Len(ValueToTest)
    > Rem if there is a zero length string input, then there are no
    > letters
    > If intLength = 0 Then
    > Let IsLetter = False
    > Exit Function
    > End If
    > Rem Check each charachter
    > For intPosition = 1 To intLength
    > Select Case Asc(Mid(ValueToTest, intPosition, 1))
    > Case 65 To 90 'UpperCase Letter
    > Let IsLetter = True
    > Case 97 To 122 'Lower Case Letter
    > Let IsLetter = True
    > Case Else
    > Rem if there are any which are not then set to false
    > and exit
    > Let IsLetter = False
    > Exit Function
    > End Select
    > Next intPosition
    > End Function
    >
    > - Alex wrote:
    > > Hello
    > >
    > > I am woking on a log on program in Access and Having trouble with the
    > > interface to add new users. I use a list box to show them and a seperate From
    > > to add new users. Now it work fine, but when I add a user that has a
    > > charichter in it, come of them blow it up quite nicley, such as ' " , ; | \ !
    > > all either throw off my index on the Listbox, or group all the records
    > > together thinking there the same.
    > >
    > > I would use Input masks but (beside the fact that there ugly) I need some of
    > > the chars in there such a ^ and ~ (which don't explode the program). what I
    > > need is some form of Is letter fucntion, but can't find such a thing to
    > > exisist in Access.
    > >
    > > If anyone knew of such a function that would be grand.

    >
    >
     

Share This Page