Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Software > Access Queries > Running balance...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 5 Topic 41194 of 43104
Post > Topic >>

Running balance from two tables

by =?Utf-8?B?ZzJ2?= <g2v@[EMAIL PROTECTED] > Aug 6, 2008 at 06:21 AM

Using Access 2007.
Cafeteria database.
Trying to show employees how much money is in their account by having a 
running balance of how much money they put in ONE table compared to how
much 
money they spend each time they get a meal.  From reading other posts, it 
looks like I needed to make 2 queries, then make a 3rd query to do the
math, 
but I'm stuck.

I have a table that tracks employee's balances for cafeteria meals (if
they 
enter $50 today, then $15 tomorrow, etc)...then a table that tracks each
time 
they buy a meal in our cafeteria (ranging in price from .50 to $2.75 to
$5).

Now I want to have a running balance for each employee.  Ideally when they

scan their card, I'd like an if statement or something with validation to 
show how much they have on screen (like a pop up box - I'd also like a pop
up 
box to ask the employee if they plan to eat the next meal so we can plan
for 
food costs, but that's another question for another post (unless you know
the 
answer here?)).

First I made a query on employeeBalance table, in datasheet view I went to

totals and showed the SUM for balance, then did the same in the other
table 
to make a query for cost on employeeScannedMeals table.  At the bottom of 
both tables in DATASHEET VIEW it shows me the total, but I don't know how
to 
reference that line of totals in a third query.  I tried in SQL, but I'm
not 
sure how to do those queries very well and I haven't seen a way to access
the 
SUM/TOTAL line from the query in any part of Access.

How do you build that 3rd query and access that totals field?

I tried from in the design view to use the SUM option of the query and
make 
a new column, but that never did the math on my column, it just repeated
the 
balanceAddition column that had the amount the employee entered, but no
total.

Basically I need a way to take all the money and employee puts in their 
account and all the times they scan their card for a meal, add all of them
up 
and subtract them from their balance to show a total.  Either on a re****t,

but PREFERABLY in a drop down or somewhere we can show them how much money

they have.  It'd be nice to have it automatically alert them when they had

less than $5 in their account.

Thanks!
Tony
 




 5 Posts in Topic:
Running balance from two tables
=?Utf-8?B?ZzJ2?= <g2v@  2008-08-06 06:21:01 
Re: Running balance from two tables
"Jeff Boyce" &l  2008-08-06 08:43:52 
Re: Running balance from two tables
=?Utf-8?B?ZzJ2?= <g2v@  2008-08-07 06:48:01 
Re: Running balance from two tables
"Jeff Boyce" &l  2008-08-07 09:57:17 
Re: Running balance from two tables
"Jeff Boyce" &l  2008-08-07 11:14:48 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Thu Nov 20 21:01:47 CST 2008.