Chart - X axis Label Data Format

D

David Anderson

Hi!

I'm using Access 2003.

I'm creating a report based on a Access database. My database contain a
column that define "day range" values such as ("1-10", "11-20"...etc) for
employee's number of days absent.

I can succssfully link a bar chart with the database. Axis Y is number of
employees and Axis X is day ranges (i.e. e.g. ("1-10", "11-20"...etc)).

However, some values of axis X Label is showing up with date format! For
example day range "1-10" is represented as "Jan 10". How can I correct this?

Data type in the day range column is set to "Text". As far as my knowledge
goes, "text" data type should be presented "as-is" without any formatting on
the data. It has been driving me nuts a whole day.

Thank you all in advance.

David
 
S

SA

Dave:

1.) You have to set the format for the data type in the Datasheet of the
Graph Object. Right click on the sample numbers column header and choose
"Number Format" and set it to text.

2.) This can still sometimes go awry and you have to "force" graph to use
text formatting via code when the data is refreshed in Graph. To see how to
do that, stop by our web and look in the Code and Design tips area under
Reports and look at the tips under the heading "Common Problems and Issues
with Graph", for item 4

HTH
 
F

fredg

Hi!

I'm using Access 2003.

I'm creating a report based on a Access database. My database contain a
column that define "day range" values such as ("1-10", "11-20"...etc) for
employee's number of days absent.

I can succssfully link a bar chart with the database. Axis Y is number of
employees and Axis X is day ranges (i.e. e.g. ("1-10", "11-20"...etc)).

However, some values of axis X Label is showing up with date format! For
example day range "1-10" is represented as "Jan 10". How can I correct this?

Data type in the day range column is set to "Text". As far as my knowledge
goes, "text" data type should be presented "as-is" without any formatting on
the data. It has been driving me nuts a whole day.

Thank you all in advance.

David

While the actual field may be set to Text, the graph object axes
themselves can be formatted to date, number, text, etc.
In Chart edit mode, select the Axis line then right-click and select
Format Axis.
On the Number Format tab, set the Number format to TEXT.
Does that help?
 
D

David Anderson

Thanks Steve,

I'm checking it out now.

David

SA said:
Dave:

1.) You have to set the format for the data type in the Datasheet of the
Graph Object. Right click on the sample numbers column header and choose
"Number Format" and set it to text.

2.) This can still sometimes go awry and you have to "force" graph to use
text formatting via code when the data is refreshed in Graph. To see how to
do that, stop by our web and look in the Code and Design tips area under
Reports and look at the tips under the heading "Common Problems and Issues
with Graph", for item 4

HTH
 
D

David Anderson

Hi Fred,

It still showing up with date formats even though I've formatted the Graph
data sheet with "Text".

David
 
D

David Anderson

Hi Steve,

I can't still get around the problem, even after using the code you've
provided.

I only changed the following line from your code...

objDS.Range("A1:Z200").NumberFormat = "@"

I need my graph to display all the labels of axis X in "Text" format.

Please help me.

Thanks,
David
 

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

Top