Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Formatted text box

Is there a way to force a format on a text box ? I mean like in Access or Clipper. Let's say I wan't to force a user to enter currectly a phone number.


I don't mean reprograming for each control, It's just to much.


Comments

  • You can use the KeyPress event to watch for any characters you don't want and set KeyAscii to 0.


    This is a question that has been asked before, I'm not sure if there is an easy way to do it.


  • You can use a Masked Edit Control.





  • Where can I find it?

    : You can use a Masked Edit Control.





  • You can add it to your project by pressing Ctrl+T. Find it in the list you'll see. Check it and press Ok.





  • Correction, the control is visible in professional edition (not learning..). If the system is flooded with OCX files (like mine), you have to find the file by browsing the system




    : You can add it to your project by pressing Ctrl+T. Find it in the list you'll see. Check it and press Ok.





  • one last thing about this control, why can't I bind it to an adodc control ? It just wouldnt let me. Also having this problem is the DTpicker and calendar control.


    : You can use a Masked Edit Control.





  • Chris BrownChris Brown USAMember Posts: 4,496 ✭✭

    _____ | http://forcoder.org | free ebooks and video tutorials about { JavaScript, Python, Java, R, MATLAB, Objective-C, PHP, C#, Ruby, Visual Basic .NET, Scratch, Perl, Delphi, C++, Go, PL/SQL, Swift, C, Assembly, Visual Basic Scheme, Transact-SQL, Lisp, Dart, Hack, VBScript, Kotlin, Clojure, LabVIEW, Apex, F#, Lua, Julia, Prolog, Alice, ML, Logo, COBOL, Awk, Ada, Scala, SAS, Crystal, FoxPro, Erlang, Fortran, Bash, D, Rust, ABAP } ____

Sign In or Register to comment.