S
Steven
I would like to make a query where can use a variable to
tell one of the fields what I want it to do. The ultimate
goal of the query is to Sum() fields in a table. The
problem is that depending on the period the user wants to
sum through the Sum() expression will change. For
example: The user wants the sum Jan - Feb the expression
would be Sum([101]+[102]). Jan - June it would be Sum
([101]+[102]+[103]+[104]+[105]+[106]). Is there a way you
can pass a variable with the Sum() function expression to
a query?
The query would look something like:
The ????? is what I am trying to do. Can I pass a string
variable or some kind of variable to here to tell which
fields I want to total?
Field: Company Account ?????
Table: Balances Balances Balances
Total: Group By Group By Expression
Sort: Ascending Ascending
Show
Criteria:
Thank you for your help.
If I am totally off base is there a solution to this.
Thanks.
tell one of the fields what I want it to do. The ultimate
goal of the query is to Sum() fields in a table. The
problem is that depending on the period the user wants to
sum through the Sum() expression will change. For
example: The user wants the sum Jan - Feb the expression
would be Sum([101]+[102]). Jan - June it would be Sum
([101]+[102]+[103]+[104]+[105]+[106]). Is there a way you
can pass a variable with the Sum() function expression to
a query?
The query would look something like:
The ????? is what I am trying to do. Can I pass a string
variable or some kind of variable to here to tell which
fields I want to total?
Field: Company Account ?????
Table: Balances Balances Balances
Total: Group By Group By Expression
Sort: Ascending Ascending
Show
Criteria:
Thank you for your help.
If I am totally off base is there a solution to this.
Thanks.