Results 1 to 5 of 5
  1. #1
    Join Date
    Jan 2012
    Posts
    2

    Unanswered: Using access to make patient records

    Hi there everyone! Im new here but I have a quick question. I am not familiar with much SQL, and I am trying to start learning access and then get into using mysql. Anyways my problem is that I am making a 2 tabled database, one that holds patient information, while another one holds records of patient appointments. My one issue I am running into, is that I want to count how many total appointments a patient has ever had by counting how many date values there are.

    Appointment rows all have date, physician, patient, and work tele. Each row consists of a new appointment ( not having a drop down list associated with all dates of the patient. A little "find how many times X's name comes up on the appointment side would work in the same way, so either or is fine by me. Can anyone help? I apologize I realize it is a dumb question ><

  2. #2
    Join Date
    May 2004
    Location
    New York State
    Posts
    1,178
    Welcome to the Access forum.

    I suggest you don't try summing the appointments by counting the date values. You'll get '1' for an answer every time, because the patient only has one appointment on any date. What you want to do is count how many times the patient name appears in the appointment file. That will give you what you're looking for.

    Good luck,

    Sam

  3. #3
    Join Date
    Mar 2009
    Posts
    5,442
    Provided Answers: 14
    You can retrieve this kind of information from a query (change the names to match those in your database):
    Code:
    SELECT PatientID, Count(*) AS AppointmentCount
    FROM Tbl_Appointments
    GROUP BY PatiendID
    Have a nice day!

  4. #4
    Join Date
    Jan 2012
    Posts
    2
    thanks alot guys! I usually just need a little push before I can get started in learning something like this.

  5. #5
    Join Date
    Mar 2009
    Posts
    5,442
    Provided Answers: 14
    You're welcome!
    Have a nice day!

Posting Permissions

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