Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27225

[RESOLVED] Masked Date

$
0
0
Hello Everyone,
I have a masked textbox for date mm/dd/yyyy - mskdate.text
I need to do the following:
If this masked textbox is empty, then the user will be prompted to enter a date when clicking on the SAVE button. However, it doesn't do anything. I tried to use Is Nothing instead of = Nothing or = "" too, it did not worked. When I debugged the code, it bypassed all the lines between Then and End If. Would you please take a look at the code below and advise me another way to achieve this or tell me what I did wrong?
Thanks much!

If mskDate.Text = "" Then
MsgBox("You must enter a date.")
mskDate.Select()
Return False
End If

Viewing all articles
Browse latest Browse all 27225

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>