Graph Problem

B

Bill

I have the following information in a query from my data base:

Name Height Gender

Bob 6-1 M
Susie 5-2 F
Steve 5-11 M
Ron 6-4 M
Barb 5-5 F

I would like to create a simple vertical bar graph. Horizontal axis will be
Name and vertical axis will be Height. Reading from left to right on the
graph, I would like to show the two "F" first followed by the three "M".
Within the two groups of "F" and "M", the bars can be shown in descending
value of Height going from left to right.

Reading from left to right it would show: Barb, Susie, Ron, Bob and Steve

It would also be helpful if I was able to distinguish the bars between the
two types of Gender. In other words, "M" would be shown one way and "F"
would be shown another way, possbily with colors or by some other means.

Any suggestions would be appreciated.

Bill
 
D

Duane Hookom

Do you realize that 6-1=5 and 5-2 = 3? If they aren't numeric then they are
text and 5-2 comes after 5-11. Also Name is a reserved word as I think is
Height. They should not be used as field names.

Charts key off the Row Source property. Your Row Source might look like
SELECT [Gender] & " " & [Name] As GenderPeople, Val(Left([Height],1)) * 12 +
Val(Mid([Height],3) As Inches
FROM [Query from my data base]
ORDER BY [Gender] & " " & [Name];

Duane Hookom
MS Access MVP
 
B

Bill

Duane:

I think I complicated my example. Here is more exactly what I have:

Query called "Copy" with three fields --- Type, Abbreviation and Value

Query indicates:

Type Abbreviation Value

A Robert 100
B James 30
B Sam 70
A Steve 50
A William 60

Bar graph should have Value on vertical axis and Abbreviation on horizontal
axis. Bars should be grouped by Type.

Graph should indicate from left to right Robert, William, Steve and then
Sam, James.

Note that the "A's" are shown first in descending Value and then the "B's"
are shown in descending value.

Hope this help clarifies things.

Thanks,

Bill




















Duane Hookom said:
Do you realize that 6-1=5 and 5-2 = 3? If they aren't numeric then they are
text and 5-2 comes after 5-11. Also Name is a reserved word as I think is
Height. They should not be used as field names.

Charts key off the Row Source property. Your Row Source might look like
SELECT [Gender] & " " & [Name] As GenderPeople, Val(Left([Height],1)) * 12 +
Val(Mid([Height],3) As Inches
FROM [Query from my data base]
ORDER BY [Gender] & " " & [Name];

Duane Hookom
MS Access MVP

Bill said:
I have the following information in a query from my data base:

Name Height Gender

Bob 6-1 M
Susie 5-2 F
Steve 5-11 M
Ron 6-4 M
Barb 5-5 F

I would like to create a simple vertical bar graph. Horizontal axis will
be
Name and vertical axis will be Height. Reading from left to right on the
graph, I would like to show the two "F" first followed by the three "M".
Within the two groups of "F" and "M", the bars can be shown in descending
value of Height going from left to right.

Reading from left to right it would show: Barb, Susie, Ron, Bob and Steve

It would also be helpful if I was able to distinguish the bars between the
two types of Gender. In other words, "M" would be shown one way and "F"
would be shown another way, possbily with colors or by some other means.

Any suggestions would be appreciated.

Bill
 
D

Duane Hookom

Just apply what I suggested in my previous reply substituting your new field
and table names. Did you try it? What were your results?

Duane Hookom
MS Access MVP

Bill said:
Duane:

I think I complicated my example. Here is more exactly what I have:

Query called "Copy" with three fields --- Type, Abbreviation and Value

Query indicates:

Type Abbreviation Value

A Robert 100
B James 30
B Sam 70
A Steve 50
A William 60

Bar graph should have Value on vertical axis and Abbreviation on
horizontal
axis. Bars should be grouped by Type.

Graph should indicate from left to right Robert, William, Steve and then
Sam, James.

Note that the "A's" are shown first in descending Value and then the
"B's"
are shown in descending value.

Hope this help clarifies things.

Thanks,

Bill




















Duane Hookom said:
Do you realize that 6-1=5 and 5-2 = 3? If they aren't numeric then they
are
text and 5-2 comes after 5-11. Also Name is a reserved word as I think is
Height. They should not be used as field names.

Charts key off the Row Source property. Your Row Source might look like
SELECT [Gender] & " " & [Name] As GenderPeople, Val(Left([Height],1)) *
12 +
Val(Mid([Height],3) As Inches
FROM [Query from my data base]
ORDER BY [Gender] & " " & [Name];

Duane Hookom
MS Access MVP

Bill said:
I have the following information in a query from my data base:

Name Height Gender

Bob 6-1 M
Susie 5-2 F
Steve 5-11 M
Ron 6-4 M
Barb 5-5 F

I would like to create a simple vertical bar graph. Horizontal axis
will
be
Name and vertical axis will be Height. Reading from left to right on
the
graph, I would like to show the two "F" first followed by the three
"M".
Within the two groups of "F" and "M", the bars can be shown in
descending
value of Height going from left to right.

Reading from left to right it would show: Barb, Susie, Ron, Bob and
Steve

It would also be helpful if I was able to distinguish the bars between
the
two types of Gender. In other words, "M" would be shown one way and
"F"
would be shown another way, possbily with colors or by some other
means.

Any suggestions would be appreciated.

Bill
 
B

Bill

Duane:

I tried it and still having a problem. Could you please rewrite your
suggestion using the new example I sent. I will then try it again.

Thank you.

Bill

Duane Hookom said:
Just apply what I suggested in my previous reply substituting your new field
and table names. Did you try it? What were your results?

Duane Hookom
MS Access MVP

Bill said:
Duane:

I think I complicated my example. Here is more exactly what I have:

Query called "Copy" with three fields --- Type, Abbreviation and Value

Query indicates:

Type Abbreviation Value

A Robert 100
B James 30
B Sam 70
A Steve 50
A William 60

Bar graph should have Value on vertical axis and Abbreviation on
horizontal
axis. Bars should be grouped by Type.

Graph should indicate from left to right Robert, William, Steve and then
Sam, James.

Note that the "A's" are shown first in descending Value and then the
"B's"
are shown in descending value.

Hope this help clarifies things.

Thanks,

Bill




















Duane Hookom said:
Do you realize that 6-1=5 and 5-2 = 3? If they aren't numeric then they
are
text and 5-2 comes after 5-11. Also Name is a reserved word as I think is
Height. They should not be used as field names.

Charts key off the Row Source property. Your Row Source might look like
SELECT [Gender] & " " & [Name] As GenderPeople, Val(Left([Height],1)) *
12 +
Val(Mid([Height],3) As Inches
FROM [Query from my data base]
ORDER BY [Gender] & " " & [Name];

Duane Hookom
MS Access MVP

I have the following information in a query from my data base:

Name Height Gender

Bob 6-1 M
Susie 5-2 F
Steve 5-11 M
Ron 6-4 M
Barb 5-5 F

I would like to create a simple vertical bar graph. Horizontal axis
will
be
Name and vertical axis will be Height. Reading from left to right on
the
graph, I would like to show the two "F" first followed by the three
"M".
Within the two groups of "F" and "M", the bars can be shown in
descending
value of Height going from left to right.

Reading from left to right it would show: Barb, Susie, Ron, Bob and
Steve

It would also be helpful if I was able to distinguish the bars between
the
two types of Gender. In other words, "M" would be shown one way and
"F"
would be shown another way, possbily with colors or by some other
means.

Any suggestions would be appreciated.

Bill
 
D

Duane Hookom

Try a row source like:
SELECT Type & ":" & Abbreviation, Value
FROM Copy
ORDER BY Type, Value DESC;

--
Duane Hookom
Microsoft Access MVP


Bill said:
Duane:

I tried it and still having a problem. Could you please rewrite your
suggestion using the new example I sent. I will then try it again.

Thank you.

Bill

Duane Hookom said:
Just apply what I suggested in my previous reply substituting your new field
and table names. Did you try it? What were your results?

Duane Hookom
MS Access MVP

Bill said:
Duane:

I think I complicated my example. Here is more exactly what I have:

Query called "Copy" with three fields --- Type, Abbreviation and Value

Query indicates:

Type Abbreviation Value

A Robert 100
B James 30
B Sam 70
A Steve 50
A William 60

Bar graph should have Value on vertical axis and Abbreviation on
horizontal
axis. Bars should be grouped by Type.

Graph should indicate from left to right Robert, William, Steve and then
Sam, James.

Note that the "A's" are shown first in descending Value and then the
"B's"
are shown in descending value.

Hope this help clarifies things.

Thanks,

Bill




















:

Do you realize that 6-1=5 and 5-2 = 3? If they aren't numeric then they
are
text and 5-2 comes after 5-11. Also Name is a reserved word as I think is
Height. They should not be used as field names.

Charts key off the Row Source property. Your Row Source might look like
SELECT [Gender] & " " & [Name] As GenderPeople, Val(Left([Height],1)) *
12 +
Val(Mid([Height],3) As Inches
FROM [Query from my data base]
ORDER BY [Gender] & " " & [Name];

Duane Hookom
MS Access MVP

I have the following information in a query from my data base:

Name Height Gender

Bob 6-1 M
Susie 5-2 F
Steve 5-11 M
Ron 6-4 M
Barb 5-5 F

I would like to create a simple vertical bar graph. Horizontal axis
will
be
Name and vertical axis will be Height. Reading from left to right on
the
graph, I would like to show the two "F" first followed by the three
"M".
Within the two groups of "F" and "M", the bars can be shown in
descending
value of Height going from left to right.

Reading from left to right it would show: Barb, Susie, Ron, Bob and
Steve

It would also be helpful if I was able to distinguish the bars between
the
two types of Gender. In other words, "M" would be shown one way and
"F"
would be shown another way, possbily with colors or by some other
means.

Any suggestions would be appreciated.

Bill
 

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