I'm new to this whole access thing. So, please bear with me.
I am putting together a database for a school board. And what I have is a table of portable classrooms and their current location and a table of every school in the district. What I need to do, is make a query as to how many portables are located at one school. I have tried to do it using dcount, but I dont know how to reference the school name from the school table. Here is what I have been trying, maybe somebody can tell me what I am doing wrong.
DCount("[Location]","Portables","[Location]=[School Name]")
Where location is a field in portables table and school name is a field in schools table.
I have gotten it to work this way;
DCount("[Location]","Portables","[Location]='School1'")
Where School1 is a school name in schools table.
Any help in this would be greatly appreciated
I am putting together a database for a school board. And what I have is a table of portable classrooms and their current location and a table of every school in the district. What I need to do, is make a query as to how many portables are located at one school. I have tried to do it using dcount, but I dont know how to reference the school name from the school table. Here is what I have been trying, maybe somebody can tell me what I am doing wrong.
DCount("[Location]","Portables","[Location]=[School Name]")
Where location is a field in portables table and school name is a field in schools table.
I have gotten it to work this way;
DCount("[Location]","Portables","[Location]='School1'")
Where School1 is a school name in schools table.
Any help in this would be greatly appreciated