473,503 Members | 1,735 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Update a field color based on field contents

Hi guys,

I'm using a subform to display a list of values from a single table.
The form is showing the values in "continuous forms" view and there
will only ever be two different values for the form. The form show 2
fields, 1 is a number and the second is a calculated field that says
either "Valid" or "Invalid" based on the first fields contents. What
I need to do is if the value is Invalid then I'd either like the text
or the actual field to be red so it stands out from the other fields
but if the value is Valid then I want the field to be standard (i.e.
white background, black text.).

Could anyone help me to work this out as it's probably very simple but
I've been pulling my hair out this morning (and there isn't very much
to begin with.).

Many thanks, Dean...
Jun 27 '08 #1
2 1826
On Mon, 16 Jun 2008 12:26:12 -0700 (PDT), DeanL wrote:
Hi guys,

I'm using a subform to display a list of values from a single table.
The form is showing the values in "continuous forms" view and there
will only ever be two different values for the form. The form show 2
fields, 1 is a number and the second is a calculated field that says
either "Valid" or "Invalid" based on the first fields contents. What
I need to do is if the value is Invalid then I'd either like the text
or the actual field to be red so it stands out from the other fields
but if the value is Valid then I want the field to be standard (i.e.
white background, black text.).

Could anyone help me to work this out as it's probably very simple but
I've been pulling my hair out this morning (and there isn't very much
to begin with.).

Many thanks, Dean...
Access 2000 or newer?
You can use the control's Conditional Formatting.

In Form Design View, select the calculated control.
Click on Format + Conditional Formatting.
Set Condition1 to
Field Value Is equal to
write
"Invalid"
in the next box.
Select the appropriate backcolor/forecolor color you wish.
Save the change.

--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
Jun 27 '08 #2
Thanks Fred,

That worked like a charm and does exactly what I need it to.

Much appreciated.

Dean...
Jun 27 '08 #3

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

Similar topics

3
5358
by: Lapchien | last post by:
done homework on Usenet and still stuck... I have a parameter query that asks the user to input the 'slip reference' based on the accounting period. This has now changed slightly so that the...
6
10443
by: Shyguy | last post by:
I want to create two buttons on a form. One would allow the user to Copy the contents of the current records memo field, the other would allow them to print. I set up a report based on the memo...
3
6299
by: rrh | last post by:
I am trying to update a field in one table with data from another table. The problem I'm running into is I need to base the update on a range of data in the 2nd table. Table 1 has: date field...
2
3888
by: John Baker | last post by:
Hi: Hi: I have a form which is based on a query, and is being used to update a table. It all works well, except for one thing. I have a number of unbound calculation fields (total value,...
2
6402
by: Nu2ASP.NET | last post by:
What I am trying to do is essentially 'flip' the bits, when the user clicks in the checkbox. For example, if the CheckBox appears checked, and the user un-checks it, I want the underlying data...
2
19554
by: Brett | last post by:
My database has 2 tables: Table1 & Table2. If a field is not null on a record in table2, then the not null fields in table1 that correspond to the records in table1 needs to be updated to match the...
4
1845
by: Ruben | last post by:
Hi, I have a continuous form that provides a listing of various instruments that are serviced on a monthly to annual basis, with general info about the instrument, last and next service dates,...
2
2888
by: hotflash | last post by:
Hi Master CroCrew, I found a good PURE ASP that will allow you to upload 10MB file to the server and the file contents such as Network, Author, Title, etc... will insert to MS Access at the same...
7
2391
by: BONES7714 | last post by:
Hello, This is my first post to any sort of forum although I've used them to learn the very little Access/VBA that I know so please forgive my ignorance. I work for the National Guard as Combat...
0
7199
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,...
0
7076
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...
0
7274
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,...
1
6984
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...
0
5576
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,...
1
5005
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...
0
3162
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...
0
3151
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1507
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 ...

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.