Change The Colour Of A TextBox / Field Depending On It's Value?

Jun 7, 2006

Hello fellow programmers,

I have a tricky one for you. We have decided to split our local City up into different zones. Giving each zone a number and assigning it a colour.

I have a form with all the customers who want jobs done in different parts of the city. This form has a text box on it called: Zone - (which has a 3 digit number it it).

I want the colour of the text box to change depending on the Zone number, in the continuous Form view.

So all the customers living in Zone=111, will have a Red background colour (color), all living in Zone=222 will have a Green background colour.

I know conditional formatting through the properties of the Form can be used, but it only allows me to select 3 different situations. I have many more than 3 colours that I want to assign.

I am working on a VB module to define what colour numbers from the MS Access Colour Map will be assigned to each Zone number.

How can I now apply this module to the form, so when it opens, all the customers who live in Zone=111 will have a Red coloured background, those living in Zone=222 will have a green colour background, etc?

View Replies


ADVERTISEMENT

Auto Colour Change Depending On Text Selected

May 5, 2005

:) Hello

Is it possible to change the colour of the text in a table. For example the word "URGENT" is selected from a combo box, and when viewed in the table it appears red.

Thanks inancipiation

Woozie

View 1 Replies View Related

Forms :: Change Textbox Background Colour Pending Value Of Two Textboxes On Form?

Jul 9, 2013

I have a form with two textboxes that get their values from two different queries that counts records from table. If textbox1.value equals texbox2.value the textbox2.value back ground colour is green. If they are not equal textbox2.value goes red. Itried with using conditional formatting, but it doesn't work all the time as the form is not updating when it is opened.

View 4 Replies View Related

Change Colour Dependant On Field Value

Jun 28, 2006

Hello,

First please accept my apologies if this has been done before. In the attached database I am going to have a form which is continous what I am looking to do is change the colour of the box which is in the background to the associated colour from the quote table for example

if they choose water then it will look at the TBLQuoteType and change the box colour to the colour which has been assigned to that value.

Hope this explains it ok I will continue to try and figure it out but I thought I could also use your expert knowledge.

14030

Thanks again

View 5 Replies View Related

Automated Field Colour Change

Apr 17, 2005

Is it possible to get Access to automatically change the colour in a form field via code etc. My problem is that i would like to easily pick/see any out of date quotations for my customers, so when the quotation date is 30 days old the text changes to red. Any advice would be gratefully received.

View 1 Replies View Related

Forms :: Change Field Depending On Combo Box

Mar 18, 2014

In the database, there is a table called "Jobs" which sales enquiries are entered into. In this table, there are fields called "JobStatus" which has the default text of "Quotation Pending" and a combo box "JobLive" which is a "yes/no" field. Normally a job will come in as quotation request and the "JobsLive" field will be set to "no".

Occasionally, a job will come in as confirmed from the outset. In this case, the job will be marked as "live" in the combo box "JobLive". Is it possible to change the "JobStatus" field to "Job Live" when this combo box is changed to "yes"?At any other stage, the "JobStatus" field will be changed using an update query as and when changes are made.

View 11 Replies View Related

Alter Text Colour Depending On Value

May 24, 2006

Hi,

I am building a stock control database. I have a form called [products]. On this form are two fields. One called [ProdReorder], the other [UnitsOnHand].

[UnitsOnHand] is displayed form a subform called [ProductsSubform].

What I want to know is: What code would I enter (& where) so if the [UnitsOnHand] value is less than the [ProdReorder] value it will display the value in red?

Eg: Reorder value is 5
I have 10 motors on stock (UnitsOnHand) = Text is black.
If I have 4 motors on stock = Text is Red.

How can this be done? any advice welcome. PS. my vba skills are weak.

View 2 Replies View Related

Change Label Caption In A Report Depending On Value Of Numeric Field?

Nov 25, 2011

I'm trying to change a label caption in a report depending the value of a numeric field.

=IIf([55]=8,[Label176].[Caption]="Spring Term",[Label176].[Caption]="Summer Term")

[55] is the numeric field.

I get a type mismatch error.

Access 2010

View 3 Replies View Related

Changing The Colour Of A Textbox

Dec 5, 2006

Is it possible to change the colour of a textbox, after clicking on a command button?

View 1 Replies View Related

Change Background Colour !

Jan 24, 2007

Hi,

I'm currently using MS Access 2002.

I use forms to display client info and i would like to know if the following is possible, and if so, how ?

When a clients installation date is older than 6months old (date is in a text box) i would like the form's background to change colour for that paticular client.

eg/ if the clients installation date was 7 months ago, the form's background would change red - but only to that client.

Kinds Regards
Chris

View 4 Replies View Related

Page Colour Name Change

Apr 25, 2005

page colour name change

View 3 Replies View Related

Change Label Colour

Nov 3, 2006

Ok what I would like to do is have a switchboard with a number of command buttons on, each button opens to a form with a few fields within them.

Is it possible for the initial switchboard labels to be 'red', then as the related form is opened and populated the switchboard label turns 'amber' and once the form is complete the switchboard label is 'green'. See example piccie attached, to get a better understanding!

This is to enable multiple users to see at a glance the status of various jobs.

If anyone knows how I can go about this or suggest any alternatives, I'm open to suggestion.

Thanks in advance

http://img101.imageshack.us/img101/223/switchsamplert7.jpg

View 4 Replies View Related

Change Text Colour

Feb 8, 2006

Friends,

I would like some help with my form.

I would like the following:

If txtname is null (without data), then txtdob font is changed to colour white.

Any help?

Thanks.

View 1 Replies View Related

Change Colour Of Image Border

Apr 14, 2005

...but I'v got a picture and I want to put a red box behind it so the picture looks like it has red borders, the problem is that the box always appears above the picture, I'm sure there must be a way to prioritize them or something but I can't find it!

View 3 Replies View Related

Change The Font Colour For The Whole Form?

Jan 17, 2006

I've been working on a database for quite a while now, and i've now given it out for testing, and i've come across a little problem. One of the users is colour blind, and the colour theme i've used throughout this database is causing him problems.

I have a function that can single him out when he logs in, question is, is there a way i can change the font colour for the whole database in one go through code??

I have around 12 forms with many controls and labels, i'm kind of hoping i don't have to name each control and label separately to change the font colour.

Please tell me that there’s some clever piece of code that can change the font colour on a form in one hit…..


Regards

Darren.

View 4 Replies View Related

Change Colour Of ALL Labels In Database

Feb 6, 2006

Hi

I have a problem where the user has certain contraints in colour.

I am trying to change all the colours of labels in the database to purple.

Is there any way to declare it once in the database and all label statements will pick up the new colour. Saves me going through every form. Also there are other users who want to use the database with black.

???:rolleyes:

View 2 Replies View Related

If NULL Then Change Background Colour

Aug 26, 2004

Im trying to change the background colour of some fields if the value is null or missing, but I'm not quite sure how to handle the coding. The fields in question are title, given name and surname, and if they are empty I want to change the background colour to highlight to users that they need to collect this information.
Any help that you can provide would be great!

View 4 Replies View Related

Need To Change A Box Colour If Chkbox = True

May 30, 2007

I have a report which i am trying to format, I want every other row's details to alternate colour which i have done (See below)

I also have on my report, a checkbox and a text feild (not sure if i could use a rectangle and format that instead , it doesn't do anything i just need it to change colour)

chkbox name = "chkClean"
Text box name = "txtclean"

I just want the back colour to go red if the check box is true and white if the check box is false

Please help

ANdy

Code:Option Compare DatabaseOption ExplicitPrivate m_RowCount As LongPrivate Sub Detail_Format(Cancel As Integer, FormatCount As Integer)m_RowCount = m_RowCount + 1 If m_RowCount / 2 = CLng(m_RowCount / 2) Then Me.Detail.BackColor = 15263976 'Change value to the color you desire Else Me.Detail.BackColor = 14811135 'Change value to the color you desire End IfIf Me.chkClean = True Then txtclean.BackColor = 255Else txtclean.BackColor = 16777215End IfEnd Sub

View 2 Replies View Related

Reports :: Colour Change In Bar Graph

Jan 30, 2015

I have a bar graph on a report in ms access that represents 4 different risks ie count on the y axis and risk type on the x axis (low, moderate high and extreme)

Question: How do i get the each bar to automatically represent the colour based on the risk colours below?

Low: Green
Moderate : Blue
High : Yellow
Extreme: Red

View 5 Replies View Related

How To Change The Colour And Other Format Properties Of A Menu/ Toolbar?

Oct 9, 2007

Hi All,

If it is possible to change the format properties of a menu/toolbar could someone please point me in the direction of some guidance/ let me know how to go about it I would appreciate it.

Specifically I'm trying to change the menu bar's /database window's property to match my forms (and company branding).

I've Googled various phrases in both UK and US spellings (to be on the safe side) and searched a few forums (this one included) and cannot find much beyond creating customised menu/tool bars.

Many thanks

View 1 Replies View Related

Datasheet Change Single Row Colour Based On Attribute

Jan 16, 2007

Hi
I am running Access 97 and I was wondering if it was possible to change the colour(background or text) of a single record based on an attribute

I was hoping that my subform, viewing all of the records (datasheet) would look like this based on Task Des column
eg Condition = red, Awaiting = Blue
(Below is ment to look like an access datasheet view)

Property No | Task Des | MCU/ROL
PN1234/DA1 | Condtion | MCU
PN1235/DA2 | Condtion | ROL
PN1994/DA1 | Awaiting | MCU

Thanks heaps for your help

View 1 Replies View Related

General :: Using A Toggle Button To Change A Label Colour?

Feb 27, 2014

Is it possible to use a toggle button to change the colour of a label?

I assume the code should be something like this:

Code:
If Me.ToggleButton = 1 Then
Label.BackColor = RGB(0, 255, 0)
ElseIf Me.ToggleButton = 0 Then
Label.BackColor = RGB(255, 255, 255)
End If

But I've tried it in the "On Click" sections and it doesn't work.

View 6 Replies View Related

Change Colour Of Entry To Differentiate Between Students And Parents Results?

Oct 7, 2011

I have a large database of students and parents which charts their weight, waist circ., lifestyle etc. When I then create reports, is it possible to change the colour of the entry so that I can differentiate between students and parents results? In other words, can I have all student entries in red and all parents in black, for example? At the moment, when I try to change the colour of one of these, the entire column changes to that colour and I don't know how to amend my reports to do this. Please see attached.

View 2 Replies View Related

Forms :: Pulling Top Values Randomly Depending On Value Entered Into Textbox

Dec 8, 2014

I have a textbox & button that when entered & pushed - run a query for the top values randomly depending on the value entered into the textbox.

My code is...

strSQL = "SELECT TOP " & Me.Text140.Value & " [CAN - NAME].Name, [CAN - CPT/VOUCHER].Voucher_Number, " & _
"[CAN - CPT/VOUCHER].Procedure_Code, [CAN - CPT/VOUCHER].Service_Date_From, [CAN - CPT/VOUCHER].Patient_ID, [CAN - CPT/VOUCHER].service_id, Rnd([service_id]) AS RandomNum " & _
"FROM [CAN - CPT/VOUCHER], [CAN - NAME] WHERE [CAN - CPT/VOUCHER].Service_Date_From Between " & Me.StartDate.Value & " And " & Me.EndDate.Value & " ORDER BY Rnd([service_id]) DESC "

It runs like it should but doesn't populate any records...that is until I go into the design view, deselect one of the fields and then reselect the same one - only then does it populate.

Do I need to open the query first and then update/append instead?

View 5 Replies View Related

Change Photo Depending On Combo Box Value

May 29, 2013

I have a log in form and combo box.

Just want to ask if possible to change photo depends on combo box value?

Here is the link of my database. [URL] ....

View 3 Replies View Related

General :: Change Photo Depending On Combo Box Value?

May 29, 2013

I have a log in form and user combo box.

I want to add photo of each user in this log-in form.

Just want to ask if possible to change photo depends on combo box value?

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved