hi,
In access2016,
How can i create a duplicated record in the main DB table if my field for 'date_closed' is not null.
Contact_ID |
Contact_LastName |
Status |
Contact_Tel |
date_closed |
1 |
Smith |
Rejected |
contact tel test 1 |
01/09/2018 |
2 |
Paul |
Complete |
contact tel test 2 |
|
3 |
|
|
|
|
And also i have below validation that should be raised only when field 'status' is set rejected and date_closed is not null.
Code:
Private Sub contact _name_BeforeUpdate(Cancel As Integer)
If IsNull(DLookup("[contact Name]", _
"Database", _
"[contact Name] = """ & Me.contact_name.Text & """")) = False Then
Cancel = True
MsgBox "contact Name already exists", vbOKOnly, "Warning"
Me![contact Name].Undo
End If
End Sub