thejabronisayz
New member
- Local time
- Today, 15:47
- Joined
- Sep 25, 2009
- Messages
- 2
Hi everyone, I'm new to access and I'm having trouble with two queries that I hope you can help me with.
The first one seems very simple to me, but for whatever reason I'm getting an error message. One of the tables I have basically has a list of a lot of people and their addresses, and I need to return the number of people who live in a certain state. So when I make the query, I pick that table, click "State", then go to totals and select "Count," and then enter in the state in the criteria box. When I do this, Access gives me an error message saying its a "Data Type Mismatch." I checked, and the field "State" is a Text data type, so I don't know what the issue is.
My other problem is more complex. I need to basically make a query in which I build my own formula to subtract two numbers from each other. For instance, I have one table with customers X, Y, and Z. Each customer made for instance $5,000 dollars, but spent $2,000 dollars. I need to make a query that will return each customer, X Y and Z, with the difference between how much they made and how much they spent. I know how to build a function and I've used the sum function before. I have tried just taking How much money they made, and subtracting how much money they spent, but I need to put an expression (such as Sum) before the subtraction, and I don't know what to put.
Any help would be great, thanks.
The first one seems very simple to me, but for whatever reason I'm getting an error message. One of the tables I have basically has a list of a lot of people and their addresses, and I need to return the number of people who live in a certain state. So when I make the query, I pick that table, click "State", then go to totals and select "Count," and then enter in the state in the criteria box. When I do this, Access gives me an error message saying its a "Data Type Mismatch." I checked, and the field "State" is a Text data type, so I don't know what the issue is.
My other problem is more complex. I need to basically make a query in which I build my own formula to subtract two numbers from each other. For instance, I have one table with customers X, Y, and Z. Each customer made for instance $5,000 dollars, but spent $2,000 dollars. I need to make a query that will return each customer, X Y and Z, with the difference between how much they made and how much they spent. I know how to build a function and I've used the sum function before. I have tried just taking How much money they made, and subtracting how much money they spent, but I need to put an expression (such as Sum) before the subtraction, and I don't know what to put.
Any help would be great, thanks.