Results 1 to 3 of 3
  1. #1
    Lounger
    Join Date
    Aug 2001
    Location
    Chewelah, Washington, USA
    Posts
    31
    Thanks
    0
    Thanked 0 Times in 0 Posts

    DateDiff (Access 2002)

    I work with a small database that tracks admissions and discharges for select group of patients in two or three hospitals. A couple of times now my boss has requested data by year, by type of hospital, how many overall bed days by year, admissions by year, discharges by year. The database is small, under 200 admissions per year. No problem if the patient is admitted and discharged in the same year, DateDiff works fine for them. I do have a problem if the admission and discharge are in different years and have a serious problem if the patient hasn

  2. #2
    4 Star Lounger
    Join Date
    Feb 2001
    Location
    Richland, Washington, USA
    Posts
    407
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: DateDiff (Access 2002)

    Sue,

    Read up on totals queries and crosstab queries. Between these two, I think you should be able to get to where you want to go without any VBA coding. You'll probably need to create some calculated expressions in your queries though.

    If you are working with days between dates, you can just use the difference between the two: e.g.: DaysInBed = nz(DischargeDate,Date()) - AdmissionDate + 1.

    This isn't everything you need, but maybe it'll get you a little further down the road. Holler if/when you need some more help; I'm sure someone here will be glad to come to your rescue.

  3. #3
    Lounger
    Join Date
    Aug 2001
    Location
    Chewelah, Washington, USA
    Posts
    31
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: DateDiff (Access 2002)

    Thanks. <img src=/S/grin.gif border=0 alt=grin width=15 height=15> I've found an explanation of your example in Helen Feddema's new book. I'll play around with the combinations. It is comforting to know all you folks are will to help us beginners.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •