SOLVED: Newbie doing Queries - Help would be appreciated
For the last week and a half I've been thrown into Access and my SQL skills are pretty much abysmal so I'm doing this in design view, just throwing this up here now.
I am working on a patient data sheet, and I'm trying to set up a query where it counts the number of times the patient has visited the office. However, the kicker is that if the patient has done a closing, then the next time they come along (for who knows how many months later) there is a new entry in the query and it starts a new count until closing.
So for example, the Table will have something like:
Name ______Date____Closing
John Smith - 1/14/14 -
John Smith - 1/18/14 -
John Smith - 1/20/14 - yes
John Smith - 2/3/14 -
John Smith - 2/7/14 -
John Smith - 2/14/14 -
John Smith - 2/15/14 - yes
John Smith - 3/12/14
The query would pop up with 3 entries of John Smith that would look something like....
Name_____Number Times Visited___Closed
John Smith - 3 - yes
John Smith - 4 - yes
John Smith - 1 -
I haven't the foggiest clue where to start writing this, so any help would be greatly appreciated.
For the last week and a half I've been thrown into Access and my SQL skills are pretty much abysmal so I'm doing this in design view, just throwing this up here now.
I am working on a patient data sheet, and I'm trying to set up a query where it counts the number of times the patient has visited the office. However, the kicker is that if the patient has done a closing, then the next time they come along (for who knows how many months later) there is a new entry in the query and it starts a new count until closing.
So for example, the Table will have something like:
Name ______Date____Closing
John Smith - 1/14/14 -
John Smith - 1/18/14 -
John Smith - 1/20/14 - yes
John Smith - 2/3/14 -
John Smith - 2/7/14 -
John Smith - 2/14/14 -
John Smith - 2/15/14 - yes
John Smith - 3/12/14
The query would pop up with 3 entries of John Smith that would look something like....
Name_____Number Times Visited___Closed
John Smith - 3 - yes
John Smith - 4 - yes
John Smith - 1 -
I haven't the foggiest clue where to start writing this, so any help would be greatly appreciated.
Last edited: