Results 1 to 8 of 8

Thread: MaskEdit Box [Resolved]

  1. #1

    Thread Starter
    PowerPoster abhijit's Avatar
    Join Date
    Jun 1999
    Location
    Chit Chat Forum.
    Posts
    3,228

    Resolved MaskEdit Box [Resolved]

    How do you clear the contents of a maskedit text box ? This particular box has its mask property set to "##/##/####". It also has the format property set to "mm/dd/yyyy".

    Now I need to clear the box. If I use a mskbox.text = "" then it gives me an invalid property value error message.
    Last edited by abhijit; Feb 13th, 2005 at 11:02 PM. Reason: Resolved
    Everything that has a computer in will fail. Everything in your life, from a watch to a car to, you know, a radio, to an iPhone, it will fail if it has a computer in it. They should kill the people who made those things.- 'Woz'
    save a blobFileStreamDataTable To Text Filemy blog

  2. #2
    PowerPoster
    Join Date
    Dec 2003
    Posts
    4,787

    Re: MaskEdit Box

    Quote Originally Posted by abhijit
    How do you clear the contents of a maskedit text box ? This particular box has its mask property set to "##/##/####". It also has the format property set to "mm/dd/yyyy".

    Now I need to clear the box. If I use a mskbox.text = "" then it gives me an invalid property value error message.
    Try

    = vbnullstring

    hope that helps

  3. #3
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: MaskEdit Box

    How about
    VB Code:
    1. MaskEdBox1.Mask = ""

  4. #4

    Thread Starter
    PowerPoster abhijit's Avatar
    Join Date
    Jun 1999
    Location
    Chit Chat Forum.
    Posts
    3,228

    Post Re: MaskEdit Box

    Have tried that option already. Also tried = vbNull.

    Those haven't worked. I also experimented with the includeliterals property of the control. That is not making a difference either.

    They should have included a clear text method.

    The only way I think it might be done is unset the format and the mask. Clear it and then reset the format.
    Everything that has a computer in will fail. Everything in your life, from a watch to a car to, you know, a radio, to an iPhone, it will fail if it has a computer in it. They should kill the people who made those things.- 'Woz'
    save a blobFileStreamDataTable To Text Filemy blog

  5. #5
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: MaskEdit Box

    Quote Originally Posted by abhijit
    The only way I think it might be done is unset the format and the mask. Clear it and then reset the format.
    I have very little experience with this control, however, what you said sounds like a logical approach. If this does work, let us know as someone else may have a similar question in the future.

  6. #6

    Thread Starter
    PowerPoster abhijit's Avatar
    Join Date
    Jun 1999
    Location
    Chit Chat Forum.
    Posts
    3,228

    Re: MaskEdit Box

    Quote Originally Posted by Hack
    How about
    VB Code:
    1. MaskEdBox1.Mask = ""
    Thats the same thing as = vbnullString

    No its not worked either.

    I have to make this change across 18 forms and deliver the code by Tuesday. So I was looking for a short-cut. I hope I am able to complete it on Monday.
    Everything that has a computer in will fail. Everything in your life, from a watch to a car to, you know, a radio, to an iPhone, it will fail if it has a computer in it. They should kill the people who made those things.- 'Woz'
    save a blobFileStreamDataTable To Text Filemy blog

  7. #7
    Addicted Member
    Join Date
    Oct 2004
    Location
    Philippines
    Posts
    149

    Re: MaskEdit Box

    you can clear it by replacing all the sharps into underscores

    Code:
     MaskedEdit.text = "__/__/____".

  8. #8

    Thread Starter
    PowerPoster abhijit's Avatar
    Join Date
    Jun 1999
    Location
    Chit Chat Forum.
    Posts
    3,228

    Resolved Re: MaskEdit Box

    Yup. That works like a charm
    Everything that has a computer in will fail. Everything in your life, from a watch to a car to, you know, a radio, to an iPhone, it will fail if it has a computer in it. They should kill the people who made those things.- 'Woz'
    save a blobFileStreamDataTable To Text Filemy blog

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