query problems

  • Thread starter Thread starter crazy_cris
  • Start date Start date
C

crazy_cris

Guest
I have *no* idea what im doing when it come to queries, and have to come up with one that will add up the amounts in two different fields (separately) and then subtract one amount from the other to give what will be the closing balance.
Anybody able to help, cause im seriously confused. Thanks.
 
Create a query on the table containing the two fields lets say 'a' and 'b'

For the first field 'a' you can get the total by w:sum(a)
Seconfd field 'b' the total would be x:sum(b)
In the next column y:w-x

Substitute your field names for a & b, you can call w & x & y anything you like

HTH

Norman
 
Thanks for that!
 
Ok, problem with this, i keep getting an error when trying to do this query, and its something to do with "In", which is part of the table title (Amount In). It said that the "In" part is invalid, and wont let me do anything as the error comes up unless "In" is deleted.
 
Surround the field name with brackets [Amount In], it's also good practice not to have spaces in field names
 

Users who are viewing this thread

Back
Top Bottom