A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Tricky Accounting query - and not sure how to build it



 
 
Thread Tools Display Modes
  #1  
Old May 13th, 2010, 05:51 PM posted to microsoft.public.access.queries
Corey-g via AccessMonster.com
external usenet poster
 
Posts: 14
Default Tricky Accounting query - and not sure how to build it

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

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...eries/201005/1

  #2  
Old May 14th, 2010, 06:14 AM posted to microsoft.public.access.queries
david
external usenet poster
 
Posts: 34
Default Tricky Accounting query - and not sure how to build it

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)



"Corey-g via AccessMonster.com" u19162@uwe wrote in message
news:a7f36b6b7c3f4@uwe...
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

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...eries/201005/1



  #3  
Old May 14th, 2010, 04:10 PM posted to microsoft.public.access.queries
Corey-g via AccessMonster.com
external usenet poster
 
Posts: 14
Default Tricky Accounting query - and not sure how to build it

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

david wrote:
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)

Hi All,

[quoted text clipped - 44 lines]

Corey


--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...eries/201005/1

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 02:50 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.