Tricky Accounting query - and not sure how to build it

  • Thread starter Corey-g via AccessMonster.com
  • Start date
C

Corey-g via AccessMonster.com

Hi All,

Sorry for the 'not so descriptive' subject - but there wasn't enough room to
write
"Need help with Financial data from multiple tables to follow where a
transaction went". :-D

I have 8 tables - all identical - for 8 different 'accounts' (not bank
accounts, but accounting 'accounts').

I have been asked if I can pull data from the 8 to try and follow a
'transaction' through these accounts.

I had thought a crosstab query might do the trick, but was having
difficulties in putting it together. So I then started by creating a union
(all) query to pull all the data into one set, then crosstab that.

Here is what I have for table structure (for all 8 tables):

[BookingID],[TransDate],[Descr],[Debit],[Credit]

I added a field in the union query to indicate the origin (called 'Origin'),
and then added the Debit & Credit amounts together to give just one column -
lets call in "TransAmt". So my union looks like this:

[Origin],[BookingID],[TransDate],[TransAmt]

Now I am doing the crosstab using the [BookingID] as the Row Heading, and the
[Origin] as the Column. And I added the [TransDate] as another Row Heading,
and did 'Sum' of [TransAmt] as the value.

I am getting results, but I'm not 100% sure if they are accurate - so I
thought I would ask in anyone thought I did this right or wrong, and any
pointers they might have in doing this sort of query.

I cringe when they suggest I do it in Excel - so if you have any thoughts or
idea's, please feel free to add them!!

Thanks in advance,

Corey
 
D

david

Nothing wrong with that. The only problem was the original
decision to put different accounts into different tables.
It's not too late: you could replace the account tables
with account queries and probably no one would notice.

Nothing wrong with using Excel to do accounts if you
are going to put each account on a separate page. Of
course, you are open to inter-page errors (and all the
really complex Excel accounts I have dealt with have
had complex errors) but--- you get the same kind of
errors in Access if you put your different accounts into
different tables.......

The total should be OK (and you need to audit a single
transaction to check that it is ok). The only place you
may have problems is when you do complex summation
mixed with complex selection mixed with complex
selection and complex grouping. Specifically when
you have MAX or MIN in the middle of a stack of
complex queries. Fortunately, that's quite rare, and
in my experience leads to fewers error than complex
spread-sheets, but I wish I could say it wasn't broken

(david)
 
C

Corey-g via AccessMonster.com

Thanks so much for your response David!

I actually did just that (put all the data into one table and used the
account # as an additional column.

This then makes the crosstab query work quite well (in terms of run time),
and I am just spot checking some records this morning to ensure I'm getting
the right results.

Thanks again,

Corey
Nothing wrong with that. The only problem was the original
decision to put different accounts into different tables.
It's not too late: you could replace the account tables
with account queries and probably no one would notice.

Nothing wrong with using Excel to do accounts if you
are going to put each account on a separate page. Of
course, you are open to inter-page errors (and all the
really complex Excel accounts I have dealt with have
had complex errors) but--- you get the same kind of
errors in Access if you put your different accounts into
different tables.......

The total should be OK (and you need to audit a single
transaction to check that it is ok). The only place you
may have problems is when you do complex summation
mixed with complex selection mixed with complex
selection and complex grouping. Specifically when
you have MAX or MIN in the middle of a stack of
complex queries. Fortunately, that's quite rare, and
in my experience leads to fewers error than complex
spread-sheets, but I wish I could say it wasn't broken

(david)
[quoted text clipped - 44 lines]
 

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