having a Few Problems

N

Nokia

I am working on making a database that is keeping track
of company accounts an keeping track of expenses, and
deposits. I am trying to show a balance on each entry
that is made in the account registry. I have it working
so fare but one problem. When I inter data on the same
day, it adds all the ones on the same day, and show the
balance of the total that it added, for every day.

exp: what I want

11.10.2003 Deposit $500.00 B $500.00
11.12.2003 Expense $30.00 B $470.00
11.12.2003 Expense $20.00 B $450.00
11.17.2003 Expense $50.00 B $400.00

This is what it is doing.


11.10.2003 Deposit $500.00 B $500.00
11.12.2003 Expense $30.00 B $450.00 -
11.12.2003 Expense $20.00 B $450.00 -
11.17.2003 Expense $50.00 B $400.00

This is the Expression I am using:

=DSum("0+[Deposit]-[Payment]","Transactions","[Date] <=
[Forms]![Accounts]![Transactions subform].FORM![Date] and
[Forms]![Accounts]![Account ID]=[Account ID]")

I have the subform Ascending by [date], that is the
reason I am pointing it to [date]. Reason: I want every
thing in order by date, but I am using random "Auto
Numbers" so that more than one person can work on the
account at the same time.
Now I thought of one way to fix the problem is make
another subform that is not visible and point it to the
[Transaction ID] and not to [Date]. But I don't know how
to copy data from one subform to another subform on the
same form by using the [Transaction ID]. Does any body
have a better way of doing it.

Another thing, does any body know how when the form is
open, to have the subform pointed to the last record?

And does anybody know how to have a combo box expand when
it has focus?

Thanks, Andrew
 
P

PC Datasheet

Two suggestions:
1. Date is a reserved word and will give you problems using it as the name of a
field. Change field name to TransactionDate.
2. Include the time in your TransactionDate at data entry and in your DSum
expression. The records for 11/12/03 will be distinct and your problem will go
away.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top