qplo
asked on
Message box show waring if date field is blank
I have data field name date. When I close the database, I like to check this field: if any record have blank then msgbox will showup.
I have small code on close like this
Private Sub Form_Close()
If Me.date = "" Then
MsgBox "Date need update"
End If
End Sub
But not working. Do I miss something here? Please help
I have small code on close like this
Private Sub Form_Close()
If Me.date = "" Then
MsgBox "Date need update"
End If
End Sub
But not working. Do I miss something here? Please help
ASKER
Nope, still not work
ASKER
Anyone can help me, please?
ASKER
I still would like to see any one can help me on this small problem. Thanks
"if any record have blank"
Are you saying in ANY record in the table? If so, then no, this will not work.
mx
Are you saying in ANY record in the table? If so, then no, this will not work.
mx
ASKER
I would check for single record if the date field blank , BUT not whole database.
ASKER
MX,
Do you have any other way to make it work? Thanks
Do you have any other way to make it work? Thanks
ASKER
Hello MX,
Are you still helping me?
Are you still helping me?
ASKER
I just don't know understand why no one can help me to on this small problem here?
Am I in the wrong place?
Am I in the wrong place?
ASKER
I gave up and would like cancel this question.
Thanks
Thanks
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 found the code similar like you and work well. However, I really appreciate for your code and I will reward the point for you.
Thank you for your help Sinjin,
Thank you for your help Sinjin,
Private Sub Form_UnLoad(Cancel As Integer)
If Nz(Me.date, "") = "" Then
MsgBox "Date need update"
Cancel = True
End If
End Sub
mx