473,396 Members | 1,933 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Change textbox forecolor in Tabular form

bard777
23
I am creating a project management DB for our company. I have a project form that has a requirements tabular subform. I want to change the due date textbox to red if the sue date has pasts.

I have been able to do this, but it seems to be evaluating the first value for this text box and setting the forecolor for all records instead of evaluating them individually.

Here is my code:

Expand|Select|Wrap|Line Numbers
  1. ' Flag requirements past Due Date on Load
  2.  
  3. If Me.due_date < Date Then
  4.     Me.due_date.ForeColor = RGB(255, 0, 0)
  5. Else
  6.     Me.due_date.ForeColor = RGB(0, 0, 0)
  7. End If
  8.  
I tried it in the On Load event (and several others).

This is not critical to the functionality of the DB, but it just seems like I should be able to do it...and, well, I am sure you know how that feels. :)
Apr 28 '10 #1

✓ answered by missinglinq

For Continuous (Tabular) and Datasheet View forms you have to use Conditional Formatting off of the Format Menu in Form Design View.
  1. Select the Due_Date textbox
  2. Goto Format - Conditional Formatting
  3. Select Expression Is
  4. Then enter [Due_Date]<Date()
  5. Select the ForeColor you want from the ForeColor Icon
Linq ;0)>

2 4231
bard777
23
I figured it out....thanks to:

Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html

I used Conditional Formatting (on the Format menu in form design.) and just set the condition to "Less Than" and the value to "Now()".
Apr 28 '10 #2
missinglinq
3,532 Expert 2GB
For Continuous (Tabular) and Datasheet View forms you have to use Conditional Formatting off of the Format Menu in Form Design View.
  1. Select the Due_Date textbox
  2. Goto Format - Conditional Formatting
  3. Select Expression Is
  4. Then enter [Due_Date]<Date()
  5. Select the ForeColor you want from the ForeColor Icon
Linq ;0)>
Apr 28 '10 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Xiphias | last post by:
Hi, Im trying to change the color of a text box on a report that im printing from a form. On the form I got a check box that has to tricker the color of that textbox on the printed report....
3
by: Nick J | last post by:
Hi, I have seen exampled were if value is > x then change font/colour/etc. How would I go about doing the same except I would like it so that it changes if there is ANYTHING in the text box. ...
4
by: Rodrigo DeJuana | last post by:
Howdy, I'm new to this .net stuff and really have little to no training. Im trying to create a new page for a web form, so i have been pretty much jsut coping code. I having some issue with...
9
by: matt | last post by:
is it possible to change a setting, such as Forecolor for all text in a form, or do you have to change it for each text block?
4
by: Matrixreloadedth | last post by:
How to change disable color of Checkbox??? I have a checkbox with forecolor in red but when i disable by set Enable properties to false forecolor is changed to gray color but i don't want it. how...
3
by: Jim in Arizona | last post by:
I have a gridview that's being populated from an access db query. The problem I'm having is that the date/time fields in access that are populating the gridview are showing both date and time, when...
3
by: Jimmy Stewart | last post by:
this will probably seem like a lame question but it is baffling me. I want to change the features if a control on a single form, i.e. the text color of a particular field if another check box is...
7
by: garyusenet | last post by:
I'm using krypton toolkit which has allowed me to make a cool looking form. However, when I set my textbox to disabled it is 'greyed' out. The grey colour isn't in keeping with the office 2007...
0
by: Jacob Donajkowski | last post by:
Once the user logs in I want to have the users switch from the Roster View to the Profile View and enter their profile infomation and save it. Then the next time they login and go to the Profile...
3
by: crjunk | last post by:
Hi Everyone, I have a web form that I would like to enhance. What I'd like to do is this: A user adds/edits the text in a textbox. I want the adjoining label to change color. Example: User...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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
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,...
0
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...
0
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...
0
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,...

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.