Function SeenInLastThreeMonths([b]PatientName[/b] As String) As Boolean
Dim dteLast as Date
dteLast = DMax("appointmentDate", "tblAppointments", "[i]PatientNameField[/i]='" & [b]PatientName[/b] & "'")
If DateDiff("m", Date, dteLast) <= 3 Then
SeenInLastThreeMonths = True
Else
SeenInLastThreeMonths = False
End If
End Function