Charts - Data Format A97

  • Thread starter Thread starter Kahuna
  • Start date Start date
K

Kahuna

Hi Folks - I have a chart (simple bar chart), and I have a question for the
Chart Guru's!

1.The underlying query for the Chart has the 'Summed' column in 'Standard'
number format with 2 dec places. It shows the correct format when run.

When used in the chart it reverts to its original (table) format of the full
number ('x' dec places).

Is there a reason / work around for this?
 
Kahuna said:
Hi Folks - I have a chart (simple bar chart), and I have a question
for the Chart Guru's!

1.The underlying query for the Chart has the 'Summed' column in
'Standard' number format with 2 dec places. It shows the correct
format when run.
When used in the chart it reverts to its original (table) format of
the full number ('x' dec places).

Is there a reason / work around for this?

Use the Format() function rather than the Format property. The property never
propagates to other places where the data is used. You might need to wrap the
FormatFunction in CDbl() or CCur() to force the DataType back to numeric after
the rounding.
 
Thanks again Rick - is this Format() to go in the actual query or on the
OpenForm action?

I have tried it in the query (Using "Fixed" and "Standard" as the format)
but I get a 'Data Type Mismatch' error if I use the CDbl() as a wrapper and
Invalid Data Type just using Format() plain.

Could you give me an example of using Format() please Rick - with the
relevant expression for the data type?
FYI Here's the SQL:
'***************************
SELECT qryFabricCondition.fc_base_year1 AS [Base Year],
Sum(budget_schedules.bs_m2) AS [Area M2], qryFabricCondition.fc_ccr_value AS
Criticality
FROM qryFabricCondition INNER JOIN budget_schedules ON
qryFabricCondition.fc_id = budget_schedules.fc_fabric_key
WHERE (((qryFabricCondition.ad_analysis_code)>"20"))
GROUP BY qryFabricCondition.fc_base_year1, qryFabricCondition.fc_ccr_value
HAVING (((qryFabricCondition.fc_base_year1) Is Not Null));
'**************************
Cheers
 
Kahuna said:
Thanks again Rick - is this Format() to go in the actual query or on
the OpenForm action?

I have tried it in the query (Using "Fixed" and "Standard" as the
format) but I get a 'Data Type Mismatch' error if I use the CDbl() as
a wrapper and Invalid Data Type just using Format() plain.

Could you give me an example of using Format() please Rick - with the
relevant expression for the data type?

Format([SomeNumberField], "#.00")

I forgot to mention before that you should be able to apply a format to the
numbers in the chart designer as well.
 
Cheers Rick

--
Kahuna
------------
Rick Brandt said:
Kahuna said:
Thanks again Rick - is this Format() to go in the actual query or on
the OpenForm action?

I have tried it in the query (Using "Fixed" and "Standard" as the
format) but I get a 'Data Type Mismatch' error if I use the CDbl() as
a wrapper and Invalid Data Type just using Format() plain.

Could you give me an example of using Format() please Rick - with the
relevant expression for the data type?

Format([SomeNumberField], "#.00")

I forgot to mention before that you should be able to apply a format to
the numbers in the chart designer as well.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top