473,602 Members | 2,774 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Continuous Form Colour

Hi,

I have read several postings about changing the colour of text for
certain textboxes on a continuous forms. I however am unable to get
this to work for what I am trying to do. When I put in my code for
the control source I get the #Error showing up in the text boxes.
What I have in the control source for the text box is:
=iif(HotDeadLin e=-1,nextActionDat e,"") HotDeadLine is from a table
and nextActionDate is also from the same table. If I change
nextActionDate to something in quotes or change it HotDeadLine it
displays a value and not the #Error. So I assume you can't reference
2 different field names from tables... Does anyone know what I can do
to get this to work. What I need is any nextActionDates that have a
HotDeadLine value of -1 to be displayed in red otherwise the
nextActionDate will just be displayed in the usual black. If it
helps I am using Access from the Office XP Suite.

Thanks in advance for your hepl!

Brad
Nov 13 '05 #1
1 1345
Are the two fields from the table that the form is using as its Record
Source? If so, try enclosing them in brackets. I know that for most things
you don't need to if there aren't spaces in the name, but in a control's
Control Source you need to any way.

=IIf([HotDeadLine] = -1, [nextActionDate], "")

For the color change, in form design view, right click the control and
choose Conditional Formatting. In the combo box choose Expression. Set the
Expression to

[HotDeadLine] = -1

and set the color to Red.

--
Wayne Morgan
MS Access MVP
"Brad" <cr****@hotmail .com> wrote in message
news:64******** *************** ***@posting.goo gle.com...
Hi,

I have read several postings about changing the colour of text for
certain textboxes on a continuous forms. I however am unable to get
this to work for what I am trying to do. When I put in my code for
the control source I get the #Error showing up in the text boxes.
What I have in the control source for the text box is:
=iif(HotDeadLin e=-1,nextActionDat e,"") HotDeadLine is from a table
and nextActionDate is also from the same table. If I change
nextActionDate to something in quotes or change it HotDeadLine it
displays a value and not the #Error. So I assume you can't reference
2 different field names from tables... Does anyone know what I can do
to get this to work. What I need is any nextActionDates that have a
HotDeadLine value of -1 to be displayed in red otherwise the
nextActionDate will just be displayed in the usual black. If it
helps I am using Access from the Office XP Suite.

Thanks in advance for your hepl!

Brad

Nov 13 '05 #2

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

Similar topics

1
5032
by: Kit Truong | last post by:
I have an Access form in which the default view is Continuous Forms so I have all the records listed per row. I want to set the backgroud of a field in a particular row a different colour whenever that field meets a condition. Right now I have an OnLoad Form property coded as: If = "blah" Then .BackColor = 8454143
2
4010
by: Cro | last post by:
Dear Access Developers, I am developing a form with 'default view' set to "continuous forms". I am suffering with a problem I can't yet see a solution too. Each record has many fields. Two fields I would like to add a little extra functionality to are a check box and a combo box. More explicitly, I would like the 'enabled' property of a combo box control to be dependent on the value of a check box (a 'yes/no' field) in the same...
3
2352
by: Hans Karman | last post by:
Is there any way in which I can have the background colour of one or more records set to the colour stored in a datafield within the record? Hans Karman, Canberra, Australia
3
4137
by: Hans Karman | last post by:
Is it possible to set the background colour for each record in a continuous form to the colour stored in a datafield within that record? Hans Karman, Canberra, Australia
4
3165
by: Kathy | last post by:
What is the standard technique for handling the fields in the following scenario on a continuous form? Multiple Divisions. Each Division has multiple Buildings. Each Building has a Supervisor. Tables: (abbreviated) TblDivision DivisionID
10
37290
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...
9
7120
by: OllyJ | last post by:
Hi guys, I have a continuous form and one field is Day / Night, where a 'D' or 'N' is contained to represent each. Is it possible to write code for the 'on current' of the form to ensure a box contained within the specific record is one colour for those records with 'D' and another for those with 'N'? I used for...each...next statement from the help and adapted it to suit my form, but it changed the colour of ALL of the boxes depending...
2
4440
by: Steve | last post by:
I have a continuous form showing Product Code and Product Name. Product Code is five digits and is sequential. I have a textbox in the form header. What is the code to scroll the continuous form so that as I type in the the first two or three numbers of the product code in the textbox, the first product code record appears at the top of the form. I would like the continuous form to act like a combox with auto expand. Thanks!
6
5099
GazMathias
by: GazMathias | last post by:
Hi Guys, Anyone know if this is possible? I have a need to display multiple colours in a subform, next to a colour reference name. My row source includes the RGB values (intColorRed, intColorBlue, intColorGreen). I currently have the subform set up with the colour name and an unbound text box which I can easily recolour using Me.ColourPreview.BackColor = RGB( (Me.the vars above) )
0
7993
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8401
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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8404
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
6730
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 launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
5867
isladogs
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...
0
5440
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();...
0
3900
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2418
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
1510
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.