kikimayhay
asked on
MaskedTextBox removes preceding 0
I have a masked text box, for Birthdate. In the when grabbing and formatiing the data it is a date with preceeding zero's if necessary (05/05/2005)
However when it gets inseted into the masked text box it converts the aboexample date to look like 55/20/05__
The mask on the text box is 00/00/0000
Is there some way to get this to work correctly?
However when it gets inseted into the masked text box it converts the aboexample date to look like 55/20/05__
The mask on the text box is 00/00/0000
Is there some way to get this to work correctly?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I've tried that as well, the really weird thing is I have the same control on another form in the same program. It pulls the same data from the same table, and is formatted the same, yet somehow it works as intended.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Deleting and re-adding the control did not work. I had to delete the form and manually re-add all the controls (copy and pasting logic behind controls).
I cannot recreate the behaviour. Not sure what was going on but it had to be somewhere within the form itself.
I cannot recreate the behaviour. Not sure what was going on but it had to be somewhere within the form itself.
ASKER
Dispursing evenly among comments
ASKER
MaskedTextBox.text = Format(datatable(0)("DOB")
and I get results as stated above