Re: Use crosstab column heading in a calculation
- From: "Duane Hookom" <duanehookom@xxxxxxxxxxxxxxxxx>
- Date: Wed, 18 Jan 2006 09:28:00 -0600
You can use a reference to a control on a form in the same way that you
would hard-code a value. As I stated earlier, crosstabs expect you to
identify the data types of all parameters.
--
Duane Hookom
MS Access MVP
--
"Bill R via AccessMonster.com" <u9289@uwe> wrote in message
news:5a8b11974c13f@xxxxxx
> 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
.
- Follow-Ups:
- Re: Use crosstab column heading in a calculation
- From: Bill R via AccessMonster.com
- Re: Use crosstab column heading in a calculation
- From: Bill R via AccessMonster.com
- Re: Use crosstab column heading in a calculation
- References:
- Use crosstab column heading in a calculation
- From: Bill R via AccessMonster.com
- RE: Use crosstab column heading in a calculation
- From: Bill R via AccessMonster.com
- RE: Use crosstab column heading in a calculation
- From: Bill R via AccessMonster.com
- Re: Use crosstab column heading in a calculation
- From: Duane Hookom
- Re: Use crosstab column heading in a calculation
- From: Bill R via AccessMonster.com
- Use crosstab column heading in a calculation
- Prev by Date: Re: Multiple parameters
- Next by Date: Re: Concatenate multiple matches into single field?
- Previous by thread: Re: Use crosstab column heading in a calculation
- Next by thread: Re: Use crosstab column heading in a calculation
- Index(es):
Relevant Pages
|