tesla764
asked on
VB6 check date filed
How do I check for a blank date field? I think I am on the right track. If I enter a date, the code line - MsgBox "Expiration Date: " & Me.dtpExpDate, displays the date, but the date is left blank the check I do -
If dtpExpDate = "" Then
doesn't execute the line...
MsgBox "Expiration can not be Empty", vbExclamation
MsgBox "Expiration Date: " & Me.dtpExpDate
If dtpExpDate = "" Then
'verify that Expiration Date is not empty
MsgBox "Expiration can not be Empty", vbExclamation
Me.dtpExpDate.SetFocus
Exit Function
End If
Any help would be appreciated.
Thanks in advance.
Please see the attached file for a complete description.
How-do-I-check-for-a-blank-date-.docx
If dtpExpDate = "" Then
doesn't execute the line...
MsgBox "Expiration can not be Empty", vbExclamation
MsgBox "Expiration Date: " & Me.dtpExpDate
If dtpExpDate = "" Then
'verify that Expiration Date is not empty
MsgBox "Expiration can not be Empty", vbExclamation
Me.dtpExpDate.SetFocus
Exit Function
End If
Any help would be appreciated.
Thanks in advance.
Please see the attached file for a complete description.
How-do-I-check-for-a-blank-date-.docx
ASKER
Here's a jpg.
Screen-Shot.JPG
Screen-Shot.JPG
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I got this ti work...
IsNull(dtpExpDate.Value)
Is the code that worked.
Thanks for your effort and attention to this.
I will award the points for your effrt.
Thanks.
IsNull(dtpExpDate.Value)
Is the code that worked.
Thanks for your effort and attention to this.
I will award the points for your effrt.
Thanks.
--
Chris