The follow vba code fine except for the date portion, it should only run after July 1st of each year. So the date portion is apparently not coded correctly. Can anyone help?
Private Sub Command0_Click()
If IsNull(DLookup("Name", "Count_CreditDef", "")) = False And Date >= 7 / 1 / Format(Now(), "yyyy") Then
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Delnotice"
DoCmd.OpenForm stDocName, , , stLinkCriteria
End If
End Sub
Private Sub Command0_Click()
If IsNull(DLookup("Name", "Count_CreditDef", "")) = False And Date >= 7 / 1 / Format(Now(), "yyyy") Then
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Delnotice"
DoCmd.OpenForm stDocName, , , stLinkCriteria
End If
End Sub