I am working on a query for a family friend, and after setting up the columns, I'm winding up with a problem.
I am trying get the query to count the total times a person has visited the office under certain values, "W", "WI", and "CO-TX" in a column called [Ser]. If it was a separate query, then it counts everything just fine. But if I add it into the Query that I'm working on, it'll only count the one entry where it's looking up only the Pat_Type that I was searching in a previous query. So for example.
My table looks something like this....
First - Last - ---Date - Ser - Pat_Type
John - Smith - 1/1/14 - W - NP
John - Smith - 1/2/14 - WI -
John - Smith - 1/3/14 - WI
John - Smith - 1/4/14 - WI
John - Smith - 1/5/14 - OC
John - Smith - 1/6/14 - CO-TX
John - Smith - 1/7/14 - W
John - Smith - 1/8/14 - WI - NPOM
John - Smith - 1/9/14 - WI
My Query is popping up with this
First - Last - ---Date - Pat_Type - Total Visited
John - Smith - 1/1/14 - NP - ------ 1
John - Smith - 1/8/14 - NPOM ---- 1
Where I'm trying to show the total amount of W, WI, and CO-TX in every entry under that person's name. So it should look like this...
First - Last - ---Date - Pat_Type - Total Visited
John - Smith - 1/1/14 - NP - ------ 8
John - Smith - 1/8/14 - NPOM ---- 8
I know the reason it's not working is that it's counting via the group by function from the other parts of the query, is there any way to do a workaround for this?
Hopefully that made some sense. I've only been working on Access for a month and I'm still very unfamiliar with the SQL side of this program.
Any help would be greatly appreciated.
I am trying get the query to count the total times a person has visited the office under certain values, "W", "WI", and "CO-TX" in a column called [Ser]. If it was a separate query, then it counts everything just fine. But if I add it into the Query that I'm working on, it'll only count the one entry where it's looking up only the Pat_Type that I was searching in a previous query. So for example.
My table looks something like this....
First - Last - ---Date - Ser - Pat_Type
John - Smith - 1/1/14 - W - NP
John - Smith - 1/2/14 - WI -
John - Smith - 1/3/14 - WI
John - Smith - 1/4/14 - WI
John - Smith - 1/5/14 - OC
John - Smith - 1/6/14 - CO-TX
John - Smith - 1/7/14 - W
John - Smith - 1/8/14 - WI - NPOM
John - Smith - 1/9/14 - WI
My Query is popping up with this
First - Last - ---Date - Pat_Type - Total Visited
John - Smith - 1/1/14 - NP - ------ 1
John - Smith - 1/8/14 - NPOM ---- 1
Where I'm trying to show the total amount of W, WI, and CO-TX in every entry under that person's name. So it should look like this...
First - Last - ---Date - Pat_Type - Total Visited
John - Smith - 1/1/14 - NP - ------ 8
John - Smith - 1/8/14 - NPOM ---- 8
I know the reason it's not working is that it's counting via the group by function from the other parts of the query, is there any way to do a workaround for this?
Hopefully that made some sense. I've only been working on Access for a month and I'm still very unfamiliar with the SQL side of this program.
Any help would be greatly appreciated.