-
Problem in setting the text in MaskEDBox
[Originally posted by anitha]
Hi,
Iam using MaskEdBox in a VB6.0 project. Having problem setting the text retrieved from the database.
I tried the following
sTmp = txtDate.Mask
txtDate.Mask = ""
txtDate.Text = CStr(otemp.dDate)
txtDate.Mask = sTmp
When I execute , it displays "__/__/____" even though the date value is not empty.
Please help..
Thanks..
Anitha
-
Re:Problem in setting the text in MaskEDBox
[Originally posted by neophile]
Maybe try this?...
txtDate.Text = Format(otemp.dDate, "mm/dd/yyyy")
-
Re:Problem in setting the text in MaskEDBox
[Originally posted by sanjay]
sk = MaskEdBox1.Mask
MaskEdBox1.Mask = ""
MaskEdBox1.Text = Format(your record, "dd/mm/yyyy")
MaskEdBox1.Mask = sk
it should work
-
Re:Problem in setting the text in MaskEDBox
[Originally posted by neophile]
I don't think you need to do anything with the Mask property... if you pass the Text property a correctly-formatted string, it shouldn't give you any error. The error gets raised as a form of auto-validation.
-
Re:Re:Problem in setting the text in MaskEDBox
[Originally posted by anitha]
Thanks for all the reply...
Yes you are right...I did not change the mask just formatted the string and assigned to the Text property.
Thanks again for the help.
Anitha
-
Re:Problem in setting the text in MaskEDBox
[Originally posted by Vishwanath]
hai! I understood ur problem. U r converting the retrieved value into a string and then placing into the masked edit text box. U r specifying the masked control to accept only date values that to in the specified format. so that is not possible to insert a string. Send me ur complete code. I will make the corrections and resend u
Hope this may be helpful to u.
kayviess@indiatimes.com
-
Re:Problem in setting the text in MaskEDBox
[Originally posted by Vishwanath]
hai! I understood ur problem. U r converting the retrieved value into a string and then placing into the masked edit text box. U r specifying the masked control to accept only date values that to in the specified format. so that is not possible to insert a string. Send me ur complete code. I will make the corrections and resend u
Hope this may be helpful to u.
kayviess@indiatimes.com
-
Re:Problem in setting the text in MaskEDBox
[Originally posted by Vishwanath]
hai! I understood ur problem. U r converting the retrieved value into a string and then placing into the masked edit text box. U r specifying the masked control to accept only date values that to in the specified format. so that is not possible to insert a string. Send me ur complete code. I will make the corrections and resend u
Hope this may be helpful to u.
kayviess@indiatimes.com
-
Re:Re:Problem in setting the text in MaskEDBox
[Originally posted by anitha]
Hi Vishwanath,
ÿ I fixed the problem...by formatting the text correctly an then assigned to the text property.
Thanks..
Anitha
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Development Centers
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center
|