Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Creating a legend with colors from a table

Status
Not open for further replies.

tadimil

Programmer
Aug 26, 2003
19
US
I'm trying to create a legend for a report that appears to be a chart. It is located in the page section of the report layout.
The query gives the following data and layout:
------------------
Analysis | Color | '(Field Names)
------------------
18-2-3-0 | Red |
18-6-0-0 | Blue |
26-20-4 | Green|
------------------
It has a total of seven Analysis and it could go as many as ten at any given time. 10 is the max.
I have 10 fields set side by side like a column of 10 with 2 rows. Looks like an excel spreadsheet.
I would like to have the layout be like the following:
----------------------------------------------------------
18-2-3-0 |Red | 18-6-0-0 | Blue |26-20-4 | Green |
----------------------------------------------------------

and so on...where there is the name of the color, it should be the actual background color of the textbox.

I know I need to loop through the records and place the first Analysis in the first textbox and it's color in the textbox beside it and so on. Just can't figure it out.
The textboxes are named:
FirstRow: Analysis1, Color1, Analysis2, Color2...etc...all the way to 5
SecondRow: Analysis6, Color6, Analysis7, Color7...etc...all the way to 10.

Thanks in advance for the help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top