Link to home
Start Free TrialLog in
Avatar of tesla764
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
Avatar of advfinance
advfinance
Flag of United Kingdom of Great Britain and Northern Ireland image

Can you post your screenshot as an image? I can't view docx files on my phone.

--
Chris
Avatar of tesla764
tesla764

ASKER

Here's a jpg.
Screen-Shot.JPG
ASKER CERTIFIED SOLUTION
Avatar of advfinance
advfinance
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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.