W
walemly
I have a master trial balance table with the following fields:
Period
CoNo
AcctNo
AcctName
Balance
I'm trying to set up parameter queries that can be used to analyze the
master table for all future periods. My problem is how to set up the
necessary queries, macros, etc. that will allow the user to indicate
two different periods and present the mathematical difference between
those two. I have set up temp tables to hold values from a "later
period" append query and an "earlier period" append query that each
prompt the user for the sought dates and send the resulting data to the
temp tables. I would use macros to automate the steps. I was expecting
to create another query based on these two temp tables using SQL to
create a full outer join so all accounts would be presented when I
realized I don't know how to indicate the period in the output columns
presented. In other words, I want the output of this query that
compares and does math on the temp table account balances to look like
this:
CoNo AcctNo AcctName Balance 0412 Balance 0506 Difference
9999 110100 Cash 1,000.00 1,500.00 500.00
Since the periods presented will vary depending on the months needing
to be analyzed, I'm at a loss as to how to capture the parameter (or
the value in the Period field which is the same) so it can be used in
the output.
I've considered using a parameter crosstab query with which to make the
table to be further analyzed to calculate the balance differences. This
produces the periods in the column headings (i.e., the field names) as
I want but I can't set up a reusable query to run against this table
since the names of the balance fields will always be changing. Does
anyone have any suggestions? Thanks in advance.
Alan Lemly
Period
CoNo
AcctNo
AcctName
Balance
I'm trying to set up parameter queries that can be used to analyze the
master table for all future periods. My problem is how to set up the
necessary queries, macros, etc. that will allow the user to indicate
two different periods and present the mathematical difference between
those two. I have set up temp tables to hold values from a "later
period" append query and an "earlier period" append query that each
prompt the user for the sought dates and send the resulting data to the
temp tables. I would use macros to automate the steps. I was expecting
to create another query based on these two temp tables using SQL to
create a full outer join so all accounts would be presented when I
realized I don't know how to indicate the period in the output columns
presented. In other words, I want the output of this query that
compares and does math on the temp table account balances to look like
this:
CoNo AcctNo AcctName Balance 0412 Balance 0506 Difference
9999 110100 Cash 1,000.00 1,500.00 500.00
Since the periods presented will vary depending on the months needing
to be analyzed, I'm at a loss as to how to capture the parameter (or
the value in the Period field which is the same) so it can be used in
the output.
I've considered using a parameter crosstab query with which to make the
table to be further analyzed to calculate the balance differences. This
produces the periods in the column headings (i.e., the field names) as
I want but I can't set up a reusable query to run against this table
since the names of the balance fields will always be changing. Does
anyone have any suggestions? Thanks in advance.
Alan Lemly