Simple Checking Registry

JamesJoey

Registered User.
Local time
Today, 09:04
Joined
Dec 6, 2010
Messages
642
I'd like o create a simple, bare-bones checking registry in access.

I've created the fields for the data.
The table has 5 pertinent fields:

TransactionID (AutoNumber)
Payee (Text)
Payment (Currency)
Deposit (Currency)
Balance (Currency)

I'm not sure how to handle the expression for the Balance. field. I simply want to deduct the amount in Payment and add the amount in Deposit in each record.

Any help will be appreciated,
James
 
You don't have a balance field. You shouldn't store calculable fields in a database, instead you calculated them.

Further, you put your credits and debits in the same field. That way, you simply add one field up using a SUM and get your balance.

SELECT SUM([Amount]) AS Balance FROM YourTableNameHere;
 
So, when entering data into the credits/debits field, I should use a minus sign in front of the number when entering a debit (-$2.45)?

The balance field should be an unbound field added to the form with the calculation you gave?
 
I put this into the Record Source of the form:

SELECT SUM([Amount]) AS Balance FROM tblChecking

I get #Name? on all fields
 
The record sourve of the form should be tblCheckng. Then your balance control's source will be a DSum
 
I found I can use 'Total' in a splitform to get my balance.

I believe this what I was looking for.
 
About the balance field.

Should it be an unbound control or a field in the table?
 
Should it be an unbound control or a field in the table?

I think plog already answered that in his earlier post #2

You don't have a balance field. You shouldn't store calculable fields in a database, instead you calculated them.
 
His reply gives me the impression then that balance should be an unbound control.

Ok.
 
Right. He was quite emphatic that you should not have a Balance field in the table
 
I put this in the Control Source of the unbound control called Balance:

DSum("[Amount]", "tblChecking")

I get #Name? on the Balance unbound control.
 
It seems that you don't have a field called "Amount" in your table???
 
Yes, there is a field called Amount.

I needed to put an equal sign at the beginning of the expression.

Anyway, it doesn't give me a running balance like expected.
I'm accomplishing the same thing by using Total Sum on the amount field in the split form.
 

Users who are viewing this thread

Back
Top Bottom