Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

check if patient is present give plus/minus 3 months 1

Status
Not open for further replies.

din2005

Programmer
Mar 22, 2005
162
GB
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
 
Something like this ?
If strDateDiff >= -3 And strDateDiff <= 3 Then

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top