Results 1 to 3 of 3

Thread: Masked Edit

  1. #1

    Thread Starter
    Lively Member
    Join Date
    May 1999
    Location
    KC
    Posts
    72

    Talking

    I have a masked edit control bound to a database, say, for a second phone number. Not everyone has two phone numbers, so if we come to a record where this phone field is empty, the masked edit control does not clear, but keeps its previous value. What can I do to make it update each time the current record changes?

  2. #2
    Lively Member Dr_Evil's Avatar
    Join Date
    Mar 2000
    Location
    Columbus, OH
    Posts
    105
    How are you switching between records, do you use a DataControl, a query, or with code.. If you are clicking on a button you could insert this code behind it. First clear the mask, then clear text, then assign the mask again. Ex.
    Code:
    MaskEdBox1.Mask = ""
    MaskEdBox1.Text = ""
    MaskEdBox1.Mask = "(###)###-####"
    Dr_Evil
    Senior Programmer
    VS6 EE
    VS.NET EA

  3. #3

    Thread Starter
    Lively Member
    Join Date
    May 1999
    Location
    KC
    Posts
    72
    Thanks, it works great. I was trying to use the data control, but gave it up quickly because of its limitations.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width