Selasa, 17 Januari 2017

Re: [MS_AccessPros] input mask to prevent punctuation characters

 

I would add some code that intercepts the keystrokes in the text box using the KeyPress event:


Private Sub Text0_KeyPress(KeyAscii As Integer)
    Dim strProhibitedCharacters As String
    strProhibitedCharacters = "'?)(/&%ç*+;,:._-!" & Chr(34)
    If InStr(1, strProhibitedCharacters, Chr(KeyAscii)) > 0 Then
        KeyAscii = 0
    End If
End Sub

Regards,

Duane




From: MS_Access_Professionals@yahoogroups.com <MS_Access_Professionals@yahoogroups.com> on behalf of david.pratt@outlook.com [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com>
Sent: Monday, January 16, 2017 5:45 PM
To: MS_Access_Professionals@yahoogroups.com
Subject: [MS_AccessPros] input mask to prevent punctuation characters
 


I have a text field (max 50 characters) that I wish to prevent the use of any punctuation characters in.  I can't figure out how to set the input mask with a field this large.

Thank you.




__._,_.___

Posted by: Duane Hookom <duanehookom@hotmail.com>
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (2)

Have you tried the highest rated email app?
With 4.5 stars in iTunes, the Yahoo Mail app is the highest rated email app on the market. What are you waiting for? Now you can access all your inboxes (Gmail, Outlook, AOL and more) in one place. Never delete an email again with 1000GB of free cloud storage.


.

__,_._,___

Tidak ada komentar:

Posting Komentar