C
CSTarqs
Guest
Hey everyone,
Even though I'm going to feel like a moron for not knowing this I'm hoping there is a simple answer. I'm far from a master at access, and seem to be having a little trouble when it come to formatting the output of my query. I have a database made the keeps track of about 200 hundred crime reports. I want to be able to do a query that will output the 15 possible crimes as rows, and then have 4 columns which are the locations of where the crimes happened. And then for the results have how many of crime where commited there. Pretty much in an excel format (see below example). However there are some crimes that have never happened. So there are no records of them. Unfortunatly when i do my query since there are no records, they are not even listed. I need them to list the crime, and place zeros if there are none. Since this probably isn't to clear I'll put a little example below.
Data:
Robbery: 4 on campus, 5 off campus, 6 in city, 0 in apartments
ra**: 0 on cmpus, 3 off campus, 4 in city, 0 in apartments
murder: 0 on campus 0 off campus, o in city, 0 in apartments
When i do my query it looks like this
*********On Campus****Off Campus****In City
Robbery******4***********5***********6
ra**********************3 ***********4
*Notice it doesn't even list the apartments since there are no records that match, the same with murder.
I need the output to look like this:
*****On Campus *****Off Campus ***In City****apartments
Robbery****4 ************ 5********6 ********0
ra*********0*************3********4********0
murder *****0*************0 *******0********0
Any ideas? Thanks!
Even though I'm going to feel like a moron for not knowing this I'm hoping there is a simple answer. I'm far from a master at access, and seem to be having a little trouble when it come to formatting the output of my query. I have a database made the keeps track of about 200 hundred crime reports. I want to be able to do a query that will output the 15 possible crimes as rows, and then have 4 columns which are the locations of where the crimes happened. And then for the results have how many of crime where commited there. Pretty much in an excel format (see below example). However there are some crimes that have never happened. So there are no records of them. Unfortunatly when i do my query since there are no records, they are not even listed. I need them to list the crime, and place zeros if there are none. Since this probably isn't to clear I'll put a little example below.
Data:
Robbery: 4 on campus, 5 off campus, 6 in city, 0 in apartments
ra**: 0 on cmpus, 3 off campus, 4 in city, 0 in apartments
murder: 0 on campus 0 off campus, o in city, 0 in apartments
When i do my query it looks like this
*********On Campus****Off Campus****In City
Robbery******4***********5***********6
ra**********************3 ***********4
*Notice it doesn't even list the apartments since there are no records that match, the same with murder.
I need the output to look like this:
*****On Campus *****Off Campus ***In City****apartments
Robbery****4 ************ 5********6 ********0
ra*********0*************3********4********0
murder *****0*************0 *******0********0
Any ideas? Thanks!