If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
coding...
I am creating badges (name tags) and would like the status text box to have a
different background color depending on the registrants' status. something like: =(IIF([Status]="C", ---------- set color to navy ------------- =(IIF([Status]="D", ---------- set color to red ------------- =(IIF([Status]="B", ---------- set color to pink ------------- etc. thank you in advance! |
#2
|
|||
|
|||
coding...
Have you considered using Conditional Formatting?
-- Duane Hookom MS Access MVP -- "VAL" wrote in message ... I am creating badges (name tags) and would like the status text box to have a different background color depending on the registrants' status. something like: =(IIF([Status]="C", ---------- set color to navy ------------- =(IIF([Status]="D", ---------- set color to red ------------- =(IIF([Status]="B", ---------- set color to pink ------------- etc. thank you in advance! |
#3
|
|||
|
|||
coding...
Yes, I have and it works. However, Access only offers three conditions, I
have 12... so I guess I don't have a choice to program this into an event procedure and I really don't know how. What I need is: IIF Status = "D" the background will be blue, the wording will read: Participant IIF Status = "S" the background will be red, the wording will read: Speaker IIF Status = "P" the background will be purple, the wording will read: Publisher ect. Can you help, please? "Duane Hookom" wrote: Have you considered using Conditional Formatting? -- Duane Hookom MS Access MVP -- "VAL" wrote in message ... I am creating badges (name tags) and would like the status text box to have a different background color depending on the registrants' status. something like: =(IIF([Status]="C", ---------- set color to navy ------------- =(IIF([Status]="D", ---------- set color to red ------------- =(IIF([Status]="B", ---------- set color to pink ------------- etc. thank you in advance! |
#4
|
|||
|
|||
coding...
You only showed three conditions and you didn't mention anything about
having already tried this. I would add a BackGroundColor field to the table of each unique status. The field should be Long Integer and contain the color values. Add this table to your report's record source and add the field to your report's detail section. Add code to the On Format event of the detail section like: Private Sub Detail1_Format(Cancel As Integer, FormatCount As Integer) Me.Section(0).BackColor = Me.txtBackgroundColor End Sub -- Duane Hookom MS Access MVP -- "VAL" wrote in message ... Yes, I have and it works. However, Access only offers three conditions, I have 12... so I guess I don't have a choice to program this into an event procedure and I really don't know how. What I need is: IIF Status = "D" the background will be blue, the wording will read: Participant IIF Status = "S" the background will be red, the wording will read: Speaker IIF Status = "P" the background will be purple, the wording will read: Publisher ect. Can you help, please? "Duane Hookom" wrote: Have you considered using Conditional Formatting? -- Duane Hookom MS Access MVP -- "VAL" wrote in message ... I am creating badges (name tags) and would like the status text box to have a different background color depending on the registrants' status. something like: =(IIF([Status]="C", ---------- set color to navy ------------- =(IIF([Status]="D", ---------- set color to red ------------- =(IIF([Status]="B", ---------- set color to pink ------------- etc. thank you in advance! |
#6
|
|||
|
|||
coding...
It worked!!!! First try!!! THANK YOU.
"Duane Hookom" wrote: You only showed three conditions and you didn't mention anything about having already tried this. I would add a BackGroundColor field to the table of each unique status. The field should be Long Integer and contain the color values. Add this table to your report's record source and add the field to your report's detail section. Add code to the On Format event of the detail section like: Private Sub Detail1_Format(Cancel As Integer, FormatCount As Integer) Me.Section(0).BackColor = Me.txtBackgroundColor End Sub -- Duane Hookom MS Access MVP -- "VAL" wrote in message ... Yes, I have and it works. However, Access only offers three conditions, I have 12... so I guess I don't have a choice to program this into an event procedure and I really don't know how. What I need is: IIF Status = "D" the background will be blue, the wording will read: Participant IIF Status = "S" the background will be red, the wording will read: Speaker IIF Status = "P" the background will be purple, the wording will read: Publisher ect. Can you help, please? "Duane Hookom" wrote: Have you considered using Conditional Formatting? -- Duane Hookom MS Access MVP -- "VAL" wrote in message ... I am creating badges (name tags) and would like the status text box to have a different background color depending on the registrants' status. something like: =(IIF([Status]="C", ---------- set color to navy ------------- =(IIF([Status]="D", ---------- set color to red ------------- =(IIF([Status]="B", ---------- set color to pink ------------- etc. thank you in advance! |
#7
|
|||
|
|||
coding...
Glad you got it to work.
BTW: Most of us prefer to keep threads in the news groups. This is generally so that questions and answers can be shared to the entire community. In very rare cases, I will suggest that someone send me their mdb or make it available for download from the web. -- Duane Hookom MS Access MVP -- "VAL" wrote in message ... It worked!!!! First try!!! THANK YOU. "Duane Hookom" wrote: You only showed three conditions and you didn't mention anything about having already tried this. I would add a BackGroundColor field to the table of each unique status. The field should be Long Integer and contain the color values. Add this table to your report's record source and add the field to your report's detail section. Add code to the On Format event of the detail section like: Private Sub Detail1_Format(Cancel As Integer, FormatCount As Integer) Me.Section(0).BackColor = Me.txtBackgroundColor End Sub -- Duane Hookom MS Access MVP -- "VAL" wrote in message ... Yes, I have and it works. However, Access only offers three conditions, I have 12... so I guess I don't have a choice to program this into an event procedure and I really don't know how. What I need is: IIF Status = "D" the background will be blue, the wording will read: Participant IIF Status = "S" the background will be red, the wording will read: Speaker IIF Status = "P" the background will be purple, the wording will read: Publisher ect. Can you help, please? "Duane Hookom" wrote: Have you considered using Conditional Formatting? -- Duane Hookom MS Access MVP -- "VAL" wrote in message ... I am creating badges (name tags) and would like the status text box to have a different background color depending on the registrants' status. something like: =(IIF([Status]="C", ---------- set color to navy ------------- =(IIF([Status]="D", ---------- set color to red ------------- =(IIF([Status]="B", ---------- set color to pink ------------- etc. thank you in advance! |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
VB coding | ppp | General Discussion | 0 | July 29th, 2005 03:50 PM |
Dear Jeff, still struggling on the coding | Kelly Lim | General Discussion | 1 | May 4th, 2005 03:08 AM |
Hidding Macro names and coding | mrbalaje | General Discussion | 4 | April 20th, 2005 04:23 PM |
VBA Coding in PowerPoint | Chaplain Doug | Powerpoint | 2 | December 13th, 2004 02:55 PM |
Still in great need for help with VBA coding, PPT to SWF | Matthew P. | Powerpoint | 0 | November 9th, 2004 10:16 PM |