Results 1 to 2 of 2

Thread: Entering Date in Database through Mask Edit Textbox

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Aug 2000
    Location
    Birmingham, AL
    Posts
    1,276

    Question

    I am connecting to a database through an adodc control.
    I have a maskedit box and I am trying to enter a date into the database. It works fine without the mask property set, but when I set the mask to ##/##/#### , I cannot enter the date into the record. By the way my regional date setting is set to the four digit year. Please help...

  2. #2
    Hyperactive Member Paul Warren's Avatar
    Join Date
    Jun 2000
    Location
    UK
    Posts
    282

    Ah, ha

    The problems you're experiencing are because the masked edit box is crap. It doesn't handle dates+masks very well. When I've used it I just set the .Format property to a date value and don't enter any mask. This gives you more control than a normal text box but doesn't give any problems with the mask. If you want to use the mask you might try using CDate(Box.Text) before putting the value into the database.

    Hope this helps.
    That's Mr Mullet to you, you mulletless wonder.

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