473,563 Members | 2,696 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

'odd' colour request

One of my users has asked that a form change it's colour if a particular
yes/no box is ticked - possibly made a bit more tricky because the form is
tabular..?
Thanks,
Lap
Nov 12 '05 #1
6 2786
On Fri, 21 Nov 2003 07:52:44 -0000, Lapchien
<cc****@nospamp lease.eclipse.c o.uk> wrote:
One of my users has asked that a form change it's colour if a particular
yes/no box is ticked - possibly made a bit more tricky because the form
is
tabular..?
Thanks,
Lap


Hi Lap,

easy one.. Put into the code that is being executed when the yes/no box is
being something like

Me.MySectionNam e.BackColor = 12632256

Where "Me" refers to your form,
"MySectionN ame" is the name of the section of which you want to change the
colour
(There are a couple of standard ones, but I don't know what they're called
in english,
there's header, footer and detail area. You can see them in the edit mode
of a form as grey bars across the form).
".Backcolor " is the property of the section you change
and the number is the code of the colour.
You can find out the colour code if you open the properties window for a
section and klick to the right of the background color field..

HTH,

Joerg

--
Joerg Glissmann

remove pants to reply..
Nov 12 '05 #2
On Fri, 21 Nov 2003 07:52:44 -0000 in comp.databases. ms-access,
"Lapchien" <cc****@nospamp lease.eclipse.c o.uk> wrote:
One of my users has asked that a form change it's colour if a particular
yes/no box is ticked - possibly made a bit more tricky because the form is
tabular..?


By tabular you mean datasheet or continuous forms?

If datasheet then you're out of luck.

If continuous forms I assume you want different background colours on
different rows?

Create a textbox with no label, make it a big mutha that spans the
whole form, set it's controlsource proeprty to something like:

=IIf([MyCheckBox],String(30,103) ,"")

Set it's font to Webdings, size large enough to fill the whole lot.
Set it's *forecolor* property to the colour you want the back of your
form for when the checkbox is checked and backcolor to whatever you
want for normal (or make it transparent to inherit the form's
backcolor).

Use format menu, send to back.

--
A)bort, R)etry, I)nfluence with large hammer.
Nov 12 '05 #3
Trevor Best <bouncer@localh ost> wrote in
news:er******** *************** *********@4ax.c om:
On Fri, 21 Nov 2003 07:52:44 -0000 in comp.databases. ms-access,
"Lapchien" <cc****@nospamp lease.eclipse.c o.uk> wrote:
One of my users has asked that a form change it's colour if a particular
yes/no box is ticked - possibly made a bit more tricky because the form
is tabular..?


By tabular you mean datasheet or continuous forms?

If datasheet then you're out of luck.


Have you tried this with a continous form - datasheet form?

Private Sub Form_Click()
Me.DatasheetBac kColor = vbRed Xor Me.DatasheetBac kColor
End Sub

"Clicking" the form can be accomplished by clicking a record selector.

--
Lyle
(for e-mail refer to http://ffdba.com/contacts.htm)
Nov 12 '05 #4
does this work ?
Me.Detail.BackC olor = 255
Me.FormHeader.B ackColor = 255
Me.FormFooter.B ackColor = 255

or you can greater a 'grey' picture and a 'red' picture and change the
form's picture .....

"Lapchien" <cc****@nospamp lease.eclipse.c o.uk> wrote in message news:<10******* ********@ananke .eclipse.net.uk >...
One of my users has asked that a form change it's colour if a particular
yes/no box is ticked - possibly made a bit more tricky because the form is
tabular..?
Thanks,
Lap

Nov 12 '05 #5
It's quite easy to do actually. Do this in the 'After Update' event of
the tick box so that when it changes, you work out what value it holds
and then assign the colour to the form accordingly.

The colour will be a numeric value. If you change the background
colour manually you should see what these values are. e.g 255 = Red.

If it's tabular, you can set the tab control to be transparent and
then change the colour of the underlying form. Alternatively you may
be able to change to change each tab. Would need to look to confirm
this to be honest.

The only thing that won't change on the tabs is the control at the top
of the tab form. It always stays that boring old grey. I had enough of
this on an app I wrote a while back, so dropped the use of tabbed
screens (in this format) and found a better looking way of approaching
it. Depends how adventurous you are feeling.

"Lapchien" <cc****@nospamp lease.eclipse.c o.uk> wrote in message news:<10******* ********@ananke .eclipse.net.uk >...
One of my users has asked that a form change it's colour if a particular
yes/no box is ticked - possibly made a bit more tricky because the form is
tabular..?
Thanks,
Lap

Nov 12 '05 #6
On 21 Nov 2003 12:36:03 GMT in comp.databases. ms-access, Lyle
Fairfield <Mi************ @Invalid.Com> wrote:
Have you tried this with a continous form - datasheet form?

Private Sub Form_Click()
Me.DatasheetBac kColor = vbRed Xor Me.DatasheetBac kColor
End Sub

"Clicking" the form can be accomplished by clicking a record selector.


Interesting, almost a sort of highlighted colour for the current
record, sometimes you have to click twice though and clicking on
another record turns the previous one back to normal or they all turn
blue or all turn white. Not sure if any of that is supposed to happen
or not.

--
A)bort, R)etry, I)nfluence with large hammer.
Nov 12 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
1681
by: Lost arcade | last post by:
I am using PHP 4.3.4 and found something strange with a variable name. When I try to use "$company" variable (lowercase), I get odd behavior from that variable. The name of my php file is "company.php" but I didn't think that php associated them together. The behavior is that "$company" will take on values of the previously accessed $_GET...
2
1445
by: Mike | last post by:
I have a function as follows: function docolors(Rstart,Gstart,Bstart,color,incrementer) r=Rstart g=Gstart b=Bstart response.write "<div><table><tr>" for color = 0 to 255 response.write "<td style=""background-color:rgb" response.write "(" & r & "," & g & "," & b & ");"">"
10
2674
by: Geoff | last post by:
I am using the following statement in a script: If (res == 123) document.write (" Blah Blah"); else document.write (" XYZ"); This of course brings up a new page on my site and prints Blah Blah. However, the colour of the page is white & I want it to match the colour of the html page from which the original request was sent. I have...
7
1245
by: newsgroups.comcast.net | last post by:
I am having an odd problem. Every day I get application errors from my website. The errors are only from one particular ip address (The error is System.NullReferenceException: Object reference not set to an instance of an object....) The logs show that the request appear to be coming from some kind of spider or bot. They have no url referrer...
20
3140
by: Chor Lit | last post by:
Hi, I asked Bjarne Stroustrup about the idea of adding colour standard for C++, and he said that it is very difficult for compiler vendors to change their IDE. But do you think it is possible ? Note that the proposed colour standard is not just merely to ease the eye only as what presently is in C++ compilers, but to aid in syntax...
0
996
by: swansea29 | last post by:
Hi, I have created a subform in my database where actions are input, the request has come from my peers that when they complete there relevent action " they click a checkbox" can it change the colour of that particular record automatically. this would enable people to quickly brouse through the action list as i have 2 diffrent colour actions ...
6
2702
Robbie
by: Robbie | last post by:
Hi. I've made 2 functions which play around with colours. They convert a 'colour number' (I don't know what the proper name for it is, so I call it this - the Long given back by RGB(), object.BackColor, etc, which represents a value of red, green and blue) into another 'colour number' but this is a greyscale version of it. There are 2...
5
1604
by: AG | last post by:
I realize that the obvious suggestion would be malware, but my definitions are up to date and I have already scanned for it. I have also tried disabling all IE add-ons. I just rebuilt and deployed my website (WAP) in ASP.NET 2.0. Everything is working fine except from my development machine with IE6. The master page contains a Menu control...
10
1771
by: dorayme | last post by:
iCab is odd man out to the extent that even MacIE 5 gets <http://tinyurl.com/4g7qmllike for most modern browsers. -- dorayme
0
7664
marktang
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...
0
7885
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7638
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...
0
7948
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6250
agi2029
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...
0
5213
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...
1
2082
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
1
1198
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
923
bsmnconsultancy
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...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.