Hi everybody,
I know this issue has already been posted by others and I viewed all the threads dealing with it, but I still couldn't find the whole answer to my problem.
So here we go:
I have a continuous form named frmEmployees, which has 4 controls: EmployeeNumber, EmployeeName, EmployeeType and Dept. The form is sorted alphabetically and there are 3 employee types. What I need is to have a different background color for each employee type.
If I use the Conditional Formatting, I can have different background color for the EmployeeType control, but I want the other controls in the row also to have the same background color.
Please advise!
Thanks.
2 2525 MMcCarthy 14,534
Recognized Expert Moderator MVP
Try this in the Form Load event: -
Private Sub Form_Load()
-
-
If Me.EmployeeType = 1 Then
-
Me.EmployeeNumber.BackColor = 65280 ' Green
-
Me.EmployeeName.BackColor = 65280 ' Green
-
Me.EmployeeType.BackColor = 65280 ' Green
-
Me.Dept.BackColor = 65280 ' Green
-
ElseIf Me.EmployeeType = 2 Then
-
Me.EmployeeNumber.BackColor = 16711680 ' Blue
-
Me.EmployeeName.BackColor = 16711680 ' Blue
-
Me.EmployeeType.BackColor = 16711680 ' Blue
-
Me.Dept.BackColor = 16711680 ' Blue
-
Else
-
'And so on
-
End If
-
-
End Sub
-
Hi everybody,
I know this issue has already been posted by others and I viewed all the threads dealing with it, but I still couldn't find the whole answer to my problem.
So here we go:
I have a continuous form named frmEmployees, which has 4 controls: EmployeeNumber, EmployeeName, EmployeeType and Dept. The form is sorted alphabetically and there are 3 employee types. What I need is to have a different background color for each employee type.
If I use the Conditional Formatting, I can have different background color for the EmployeeType control, but I want the other controls in the row also to have the same background color.
Please advise!
Thanks.
Thanks, but it doesn't work. Anyway, meanwhile the user has changed his requirements and the color issue has been dropped.
Thanks again
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Spike |
last post by:
Hello!
Im going to make a javascript for changing alot of images. But im not
sure how to do it., where to start..
Ok, first.. this is the isue.
I have 3 images(I call them 1a-3a).
when u click on image 1a u change" image x" to image 1a
when u click on image 2a u change" image x" to image 2a
when u click on image 3a u change" image x" to image 3a
|
by: Bob - Andover, MA |
last post by:
I know how to define a background color for the entire page, and for a
table, and even using style sheets and 'P CLASS=...' for changing
paragraph background colors.
However, I'd like to be able to change background colors on a
word-by-word basis, or at least sentence-by-sentence basis. Using a
paragraph divider splits up the words or sentences, which is not
desired. I want the word to still appear inline with its neighboring
words.
|
by: Franklin |
last post by:
WITHOUT KNOWING ANYTHING ABOUT THE CURRENT COLORS, I want to swap the
foreground/background colors of a link when someone hovers over it. Is
this possible with HTML, CSS, DOM, & JavaScript? If so, how?
See my HTML below (or go to my test page at
http://fmbbowen.com:39353/misc/Misc.html). I also tried treating
..color as a number and subtracting the current color from 0xFFFFFF but
that did not work either. The numerous examples I...
|
by: JK |
last post by:
Hi All,
I am working a form which is tabular layout (continuous form) which
will display multiple records at a time. Each line of record needs to
be reflected on the color code to show their current status. In
Access 2000, you can only write the code on each control in a general
way and the code will apply on to the current record. For instance,
if you have 5 customers in display, each one of them has difference
balance, if you like to...
|
by: Marco Simone |
last post by:
Hi,
I have form with few rows of text boxes and labels. I tried to change colors
of labels, when txtBox gets focus, with code.
Private Sub txtBox1Row1_GotFocus()
Me!lblData1.BackColor = 6993407
End Sub
Private Sub txtBox1Row1_LostFocus()
| |
by: Lachlan Hunt |
last post by:
Hi,
I'm looking for an interoperable method of determining the current
background colour of an element that is set using an external
stylesheet. I've tried:
elmt.style.backgroundColor;
but that only works if the colour has been set using the style attribute
or previously set using script. I've also tried:
|
by: webgirl |
last post by:
Hi there,
I've been searching the net & the forums here over the last few days for help with my problem & am getting myself really confused.. hoping someone may be able to help me here.
I've got a continuous form which has 6 textboxes in each row, one of which contains the name of an Assessor, who (in another table) will have a particular colour assigned for him/her.
What I'm trying to do is loop through the records of the continuous...
|
by: aldeb |
last post by:
My dilemma is as follows. I have a continous form that I am using as a Visual Display Form to show the status of records (SoeCodes). What their status currently is and what they have been. I have 6 Yes/No check boxes (status). I am wanting to change color depending on which of the 6 check boxes is checked and I want to leave each checkbox checked. My form is a continuous form and since I need 6-7 colors Conditional Formatting will not work. I...
|
by: Wayne |
last post by:
Has anyone found the "Alternate Background Color" property in Access
2007 forms to be buggy? As I scroll a continuous form that is using
an alternate background color for every second record, the background
colors get confused and go haywire. Nice feature if it worked
propertly!
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |