Hi everyone,
You will shortly be able to tell that i have never done this before.
When i open my db it is set to open my start up form, from their the only option is to go to the contacts page, however before it does that i am trying to get it to check my form called Network and if the EndDate field is less than 45 days from expiring for it to display the message. Here is what i have.
Private Sub Form_Open(Cancel As Integer)
If DCount("[Contacts]", "[ContactID]", "[Network]", "[EndDate])") < Date - 45 Then
MsgBox "Contract ends in less than 45 days"
End If
End Sub
You will shortly be able to tell that i have never done this before.
When i open my db it is set to open my start up form, from their the only option is to go to the contacts page, however before it does that i am trying to get it to check my form called Network and if the EndDate field is less than 45 days from expiring for it to display the message. Here is what i have.
Private Sub Form_Open(Cancel As Integer)
If DCount("[Contacts]", "[ContactID]", "[Network]", "[EndDate])") < Date - 45 Then
MsgBox "Contract ends in less than 45 days"
End If
End Sub