Avatar of developingprogrammer
developingprogrammer

asked on 

test keycode for alphanumeric character

guys,

i have a keydown event and only want to run if an alphanumeric character is pressed. i think this is a UDF requirement.

how would yall design it? if yall could share even some air code that would be great!!

i'm so so sorry i'm so super overloaded now!!

i'm thinking something like convert the keycode to alpha and then test it for >=A <=z and also for numbers. can't think of the exact implementation but something along those lines! thanks guys!! = ))
Microsoft Access

Avatar of undefined
Last Comment
developingprogrammer
Avatar of Anthony Berenguel
Anthony Berenguel
Flag of United States of America image

Here's an example I have used before -- you will need to modify the selection statement to fit your needs.

Private Sub cbxControl_ID_KeyPress(KeyAscii As Integer)
    Debug.Print KeyAscii
    If KeyAscii = 27 Then 'esc key
        Me.cbxControl_ID.Width = 1440
    End If
End Sub

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of als315
als315
Flag of Russian Federation image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of developingprogrammer
developingprogrammer

ASKER

great! thanks aebea and als315!! = ))
Microsoft Access
Microsoft Access

Microsoft Access is a rapid application development (RAD) relational database tool. Access can be used for both desktop and web-based applications, and uses VBA (Visual Basic for Applications) as its coding language.

226K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo