Hi,
i have a query that calculates the amount of weeks since a patient had a surgery. it works fine except i'd like the total to show up on a form correctly.
I'm able to make it show up but its showing the same total for every patient.
I'm sure it something i'm not doing right in my query. here's the code for the query:
I've tried pointing my query to the ID field in my form but i received #error# in doing that.
Also, how do i round off the amount of weeks to 1 decimal place?
thanks in advance!
i have a query that calculates the amount of weeks since a patient had a surgery. it works fine except i'd like the total to show up on a form correctly.
I'm able to make it show up but its showing the same total for every patient.
I'm sure it something i'm not doing right in my query. here's the code for the query:
Code:
SELECT [PatStatusTbl].Date, [PatStatusTbl].Type, [PatStatusTbl].Status, DateDiff("y",[PatStatusTbl].[Date],Date())/7 AS WeeksPost, StatsTbl.StatsId
FROM [PatStatusTbl] RIGHT JOIN StatsTbl ON [Patient Status Table].ContactID = StatsTbl.ContactId
WHERE ((([PatStatusTbl].Date) Is Not Null) AND (([PatStatusTbl].Type)="Surgery") AND (([PatStatusTbl].Status)="Performed"));
I've tried pointing my query to the ID field in my form but i received #error# in doing that.
Also, how do i round off the amount of weeks to 1 decimal place?
thanks in advance!