Re: Use crosstab column heading in a calculation

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Duane,

Now that I've got the simple calculation working, is it possible to include a
value from a control on a form in the calculation "Expr1"? What are the
restrictions on calculations in a crosstab query? I've already come across a
problem in using a control on the main form as criteria in a crosstab query
or even in an underlying query for a crosstab query.

If I can't use data from a control on a form, I will fall back to "Plan I"
and run a make table query based on this crosstab query, and then populate
the records and fields using a calculation in VBA.

Thanks,

Bill

Duane Hookom wrote:
>You must always define the data type of all parameters in crosstab queries.
>Select Query->Parameters and enter
>[Forms]![frmSwaps]![txtSwapID] datatype
>
>BTW: without reading all your other postings, the solution for your first
>posting is to create a query with this sql
>TRANSFORM
>First([tblSwapParameters].[SpotMonth]*[tblSwapParameters_1].[SpotMonth]) AS
>Expr1
>SELECT tblSwapParameters.SpotMonth
>FROM tblSwapParameters, tblSwapParameters AS tblSwapParameters_1
>GROUP BY tblSwapParameters.SpotMonth
>PIVOT tblSwapParameters_1.SpotMonth;
>
>> PS:
>>
>[quoted text clipped - 42 lines]
>>>>>
>>>>> Bill

--
Bill Reed

"If you can't laugh at yoursel, laugh at somebody else"

Message posted via http://www.accessmonster.com
.



Relevant Pages

  • RE: Form calculation based on the date - How to????
    ... Access can't find the macro 'txtTotalDollarAmount_Bound = ... "Could it be that the control source for the form's field is now no longer ... txtTotalDollarAmount or txtTotalDollarAmount_Bound ... ... date field and then run the correct macro calculation based on that date. ...
    (microsoft.public.access.modulesdaovba)
  • Re: .visible property not firing
    ... events was their timing in relation to the calculation of the control. ... Try the OnCurrent event of the main Form, and the OnCurrent each of the ... I want to compare that third calculation with a field on ...
    (comp.databases.ms-access)
  • Re: .visible property not firing
    ... events was their timing in relation to the calculation of the control. ... time to make the calculation then the comparison and it works perfectly now. ... Try the OnCurrent event of the main Form, and the OnCurrent each of the ... I want to compare that third calculation with a field on the ...
    (comp.databases.ms-access)
  • RE: Form calculation based on the date - How to????
    ... "iez44" wrote: ... "Could it be that the control source for the form's field is now no longer ... txtTotalDollarAmount or txtTotalDollarAmount_Bound ... ... date field and then run the correct macro calculation based on that date. ...
    (microsoft.public.access.modulesdaovba)
  • Re: calculation in a access 2000 form, i need help.
    ... Nordivan wrote: ... "Marshall Barton" skrev: ... function can not use a control name. ... number is in the calculation in some way it dosent work. ...
    (microsoft.public.access.formscoding)