Re: checking for correct Chr in string

Tech-Archive recommends: Speed Up your PC by fixing your registry



yup! worked perfectly! Your first msg seemed to imply that I needed it as a
separate function.
Thanks again, Richard

pietlinden@xxxxxxxxxxx wrote:
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..

--
Message posted via http://www.accessmonster.com

.



Relevant Pages

  • Re: Verify/cancel entered text in textbox
    ... Why not just use a NumericUpDown control, ... > activates a part of the dialog that will trigger a Validation attempt. ... > can do this check either at the KeyPress event or at the TextChanged ... The TextChanged event is not cancellable (that I can ...
    (microsoft.public.dotnet.languages.csharp)
  • 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: Some questions about INTRACTIVECHANGE Event.
    ... leaves the control. ... OWNER_ TEXT. ... For example, as a user types in a text box, the InteractiveChange ... A KeyPress event is useful for intercepting keystrokes entered in a ...
    (microsoft.public.fox.helpwanted)
  • Re: Type 1k for 1000, 1m for 1000000
    ... Try the KeyPress event of the control. ... If the character is K or k, set KeyCode to 0, and assign the Text followed by 000 as the Value of the control. ... bound to a numeric field that won't accept text, so if I write code into the ... Before Update event to convert Ks and Ms to numbers, ...
    (microsoft.public.access.forms)