Hi how do i code to check if patient has been entered the past 3 months or has been entered in the 3 months coming up?
At the moment it only checks for the past 3 months is there an easier ways to check the future 3 months and past 3 months ???
'checks if patient has been entered in the past3 months
strDate = Nz(DMax("DiaryDate", "tblAppointments", "HospitalNo = '" & txtWLHospitalNo & "'"))
strDateDiff = DateDiff("m", strDate, Now)
' MsgBox strDate
If strDateDiff < 3 Then
MsgBox "Patient is currently present on the diary: Please check Date on Diary - " & strDate
Else
End If
At the moment it only checks for the past 3 months is there an easier ways to check the future 3 months and past 3 months ???
'checks if patient has been entered in the past3 months
strDate = Nz(DMax("DiaryDate", "tblAppointments", "HospitalNo = '" & txtWLHospitalNo & "'"))
strDateDiff = DateDiff("m", strDate, Now)
' MsgBox strDate
If strDateDiff < 3 Then
MsgBox "Patient is currently present on the diary: Please check Date on Diary - " & strDate
Else
End If