A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

coding...



 
 
Thread Tools Display Modes
  #1  
Old November 16th, 2005, 01:59 AM
VAL
external usenet poster
 
Posts: n/a
Default 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  
Old November 16th, 2005, 02:20 AM
Duane Hookom
external usenet poster
 
Posts: n/a
Default 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  
Old November 16th, 2005, 02:37 AM
VAL
external usenet poster
 
Posts: n/a
Default 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  
Old November 16th, 2005, 02:53 AM
Duane Hookom
external usenet poster
 
Posts: n/a
Default 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!






  #5  
Old November 16th, 2005, 05:00 AM
VAL
external usenet poster
 
Posts: n/a
Default coding...

Thank you so much for again responding so quickly and, you are right, I did
only put three examples... I get the idea of what you are suggesting but I
am not sure I fully understand how to do it. I will give it a try.

Can you not write to me directly at ? It would be
easier for me to respond. But I understand if you wish to keep your privacy.

Thank you again! Hope I can make this work. I am very new at all this and
there doesn't seem to be a book for "intermediate" users.

Val

"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!







  #6  
Old November 16th, 2005, 05:18 AM
VAL
external usenet poster
 
Posts: n/a
Default 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  
Old November 16th, 2005, 12:10 PM
Duane Hookom
external usenet poster
 
Posts: n/a
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

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


All times are GMT +1. The time now is 03:31 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.