How to check for a blank masked edit box

04-06-2003, 08:56 PM
I have a masked edit box that I would like to check for blankness. I have tried the piece of code below, but it doesn't work, the blank text gets printed anyways. I have a mask of ###.##

If mboxPrice.Text <> "" Then
' Do Something
End If


04-06-2003, 11:31 PM
Does this code do what you want

Private Sub Command1_Click()
If Me.MaskEdBox1.Text <> "" Then
For i = 1 To Len(Me.MaskEdBox1.Text)
If Asc(Mid(Me.MaskEdBox1.Text, i, 1)) >= 48 And Asc(Mid(Me.MaskEdBox1.Text, i, 1)) <= 57 Then
MsgBox Asc(Mid(Me.MaskEdBox1.Text, i, 1))
MsgBox "Please Fill Correctly"
Exit For
End If
End If
End Sub

04-07-2003, 01:40 AM
Does this code do what you want

I tried your code, and doesn't seem to do what I was looking for. I just wanted to check to see if it was blank, and if so, skip a label update. Thank you though.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum