V
Vel.
Hello,
I am trying to make a query which will dynamically show a different number
of records for each ClientID based on a date. I know that doesn't make much
sense, so let me try to explain more.
I have a query which outputs the following fields:
ClientID, RecallID, Timeframe, LastDate, StartDate, DateDue
ClientID is a uniquely identifying client ID (from tblClient)
There are 5 different RecallID values for each client; O, M, I, P, and F
(from a query which binds tblClient to tblRecallTypes)
TimeFrame is the length of time, in days, from when one recall is "due" to
the time the next will be due (from tblRecallTypes)
The LastDate field is a field which is populated with the most recent date
in tblRecall for which each ClientID has a RecallID based on a query, it is
null if a client has never had that type of recall
(For instance, someone might have three 'O's on three different dates,
LastDate is the most recent)
StartDate is the date the client entered treatment at our facility.
DateDue is the date the next item of Recall is due for that client, based
the value of LastDate+TimeFrame
Here's the thing. I want to only display those records where
LastDate+Timeframe<=Now() . This is something I am able to accomplish.
However, the more complicated part is, I want to continue to add the
timeframe to the LastDate over and over again for certain types of paperwork,
coming up with a new record and date due until I reach Now(). This report is
used to track outstanding paperwork and, on occasion, more than one of a
certain paperwork (RecallID) may be due. For instance
ClientID 12345, for RecallID "O", which has a timeframe of 30 days, has the
following record:
12345 ; O ; 30 ; 05/05/05 ; 01/19/05 ; 06/04/05
What I would prefer to have as an output would be
12345 ; O ; 30 ; 05/05/05 ; 01/19/05 ; 06/04/05
12345 ; O ; 30 ; 05/05/05 ; 01/19/05 ; 07/04/05
12345 ; O ; 30 ; 05/05/05 ; 01/19/05 ; 08/03/05
If I need to make a new query based on the previous one that is fine. I am
able to make multiple fields (IE DateDue1, DateDue2, DateDue3, etc.) by
multiplying the time frame, but that doesn't give me the functionality
necessary for making a report.
I hope this is clear, and if not, I will do my best to clarify if anyone has
any suggestions.
Thank You.
I am trying to make a query which will dynamically show a different number
of records for each ClientID based on a date. I know that doesn't make much
sense, so let me try to explain more.
I have a query which outputs the following fields:
ClientID, RecallID, Timeframe, LastDate, StartDate, DateDue
ClientID is a uniquely identifying client ID (from tblClient)
There are 5 different RecallID values for each client; O, M, I, P, and F
(from a query which binds tblClient to tblRecallTypes)
TimeFrame is the length of time, in days, from when one recall is "due" to
the time the next will be due (from tblRecallTypes)
The LastDate field is a field which is populated with the most recent date
in tblRecall for which each ClientID has a RecallID based on a query, it is
null if a client has never had that type of recall
(For instance, someone might have three 'O's on three different dates,
LastDate is the most recent)
StartDate is the date the client entered treatment at our facility.
DateDue is the date the next item of Recall is due for that client, based
the value of LastDate+TimeFrame
Here's the thing. I want to only display those records where
LastDate+Timeframe<=Now() . This is something I am able to accomplish.
However, the more complicated part is, I want to continue to add the
timeframe to the LastDate over and over again for certain types of paperwork,
coming up with a new record and date due until I reach Now(). This report is
used to track outstanding paperwork and, on occasion, more than one of a
certain paperwork (RecallID) may be due. For instance
ClientID 12345, for RecallID "O", which has a timeframe of 30 days, has the
following record:
12345 ; O ; 30 ; 05/05/05 ; 01/19/05 ; 06/04/05
What I would prefer to have as an output would be
12345 ; O ; 30 ; 05/05/05 ; 01/19/05 ; 06/04/05
12345 ; O ; 30 ; 05/05/05 ; 01/19/05 ; 07/04/05
12345 ; O ; 30 ; 05/05/05 ; 01/19/05 ; 08/03/05
If I need to make a new query based on the previous one that is fine. I am
able to make multiple fields (IE DateDue1, DateDue2, DateDue3, etc.) by
multiplying the time frame, but that doesn't give me the functionality
necessary for making a report.
I hope this is clear, and if not, I will do my best to clarify if anyone has
any suggestions.
Thank You.