Determining data from a certain date range

65 pts.
Tags:
Data access
Database management
Date calculation
Microsoft Access 2003
I have an Access 2003 database that has weekly dates and weights enter for a weight loss program. Ech program session is 8 weeks and people sign up for anywhere from 1 to many more sessions at a time. I want to find out the average weight lost in the first 8 weeks that a patient belongs, then in 16 weeks and so on. However, not every patient has every week entered and all pateints start on different weeks (but the weigh ins are always Wednesdays. Is there a way to pull the dates and weights from everyones first session, second session, and so on? I have tried doing [initial date] + 56, dateadd [ww, 8, initialdate] and CountofDate but none have pulled more than 25% of the patients.

Software/Hardware used:
Microsoft Access 2003

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Discuss This Question: 6  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • BigKat
    you will have to generate a "driving file" to use in a left outer join.  This file would consist of every patient and every Wednesday from their start date to current.  Their data is attached where it matches.  Then you can count off the weeks for your sessions, and do your averages, etc.
    8,100 pointsBadges:
    report
  • BigKat
    program: Int(DateDiff('ww',[start_date],[session_date])/8)+1
    8,100 pointsBadges:
    report
  • HSwartzPartners
    thank you very much I will try that!!
    65 pointsBadges:
    report
  • ShawnHendricks
    <p>You don't need initial date.  Ignore it for purposes of your calculations.  Instead, tally only their weekly weights.</p><p>This may be a case where you have a lot of available data and you want to make use of it.  Yes, the initial date has value elsewhere - and should be used there - but for your statistics, that data is not required.</p><p>Every person starts at week 0 with their initial weigh-in.  Their next weigh-ins are recorded after this and if no weigh-in happens, enter the same weight as last week.  If they weigh in the following week, use an average for the week between.  If they miss more than one weigh-in, use the higher of the recorded ends for the intervening weeks.  ALWAYS indicate interpolated weigh-ins.</p>
    1,590 pointsBadges:
    report
  • HSwartzPartners
    @BigKat I tried doing that and got a column in my query thats says Expr1 (representing the formula you gave me) but am not positive what it means...what is the +1 for?  Also now that I have a count of the weeks that everyone stayed for, how to do I get the weight of every person on their 8th week for example.  When i write in criteria "=8" it only comes up with patients whose total time in the program was 8 weeks as opposed to every patient's 8th week regardless of the length of their membership?  I appreciate any advice or help you can give!!
    65 pointsBadges:
    report
  • HSwartzPartners
    also the number of patients from the past 3 years is 211 but my query has 764 records ( it is showing many duplicates) even with MaxofDate and LastofWEight in the Totals Query.
    65 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following