Re: checking for correct Chr in string



Probably the most foolproof way of doing it is to copy this part into
the KeyPress event of your control (the textbox).

Select Case KeyAscii
Case 58, 46, 59 '---list of the asc(":") values that you want to
reject
KeyAscii = 0
Case Else 'do nothing
End Select

to get the KeyPress event of your control... right-click on the control
in design view, select the KeyPress event, and then when you get the
code window, paste in the above code..

.



Relevant Pages

  • Re: Inputbox values control
    ... to control the datatype of the values that are entered in the inputbox, ... ' Syntax: KeyNonNumeric KeyAscii ... KeyNonNumeric), then call it from a textbox's KeyPress event, like this: ...
    (microsoft.public.access.modulesdaovba)
  • Re: checking for correct Chr in string
    ... the KeyPress event of your control. ... Select Case KeyAscii ... code window, ...
    (microsoft.public.access.modulesdaovba)
  • Re: checking for correct Chr in string
    ... the KeyPress event of your control. ... Select Case KeyAscii ... code window, ...
    (microsoft.public.access.modulesdaovba)
  • Re: checking for correct Chr in string
    ... the KeyPress event of your control. ... Select Case KeyAscii ... code window, ...
    (microsoft.public.access.modulesdaovba)
  • Re: checking for correct Chr in string
    ... the KeyPress event of your control. ... Select Case KeyAscii ... code window, ...
    (microsoft.public.access.modulesdaovba)