473,802 Members | 2,031 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Change forecolor of field in subform Access 2007

TD
I am trying to change the forecolor of a field in a subform that is in
datasheet view. I am using Access 2007. I have tried everything I
can think of to do this but the text still appears in black. I need
it to appear in red if the field has the word "YES" in it. Is there
something in Access 2007 that keeps this from working?????

Feb 20 '08 #1
4 6491
Access does not have the capability to change colors of fonts/cells in a
datasheet view -- natively.

One fix that comes to mind would be to create a com User control in
VB2005 using a datagridview control (the .Net equivalent of an Access
subform) which has mega versitility and then implement that in Access.
The only caveat here would be that whoever used the control would need
to be running the .Net 2.0 framework on the respective workstation(s)

Rich

*** Sent via Developersdex http://www.developersdex.com ***
Feb 20 '08 #2
TD
On Feb 20, 2:56*pm, Rich P <rpng...@aol.co mwrote:
Access does not have the capability to change colors of fonts/cells in a
datasheet view -- natively. *

One fix that comes to mind would be to create a com User control in
VB2005 using a datagridview control (the .Net equivalent of an Access
subform) which has mega versitility and then implement that in Access.
The only caveat here would be that whoever used the control would need
to be running the .Net 2.0 framework on the respective workstation(s)

Rich

*** Sent via Developersdexht tp://www.developersd ex.com***
Thanks for the help!
Feb 20 '08 #3
On Feb 20, 12:37*pm, TD <d...@adsi-sc.comwrote:
I am trying to change the forecolor of a field in a subform that is in
datasheet view. *I am using Access 2007. *I have tried everything I
can think of to do this but the text still appears in black. *I need
it to appear in red if the field has the word "YES" in it. *Is there
something in Access 2007 that keeps this from working?????
Well, you can try this way on your form
you need to create two unbound textboxes

in the controlsource of the first one
=IIf([yourYesNofield]="yes",[yourYesNofield],"")
define the forecolor of this one as red(or whatever color you want)

in the controlsource of the second one
=IIf([yourYesNofield]="no",[yourYesNofield],"")
define the forecolor of this one as black(or whatever color you want)

be sure you have the real [yourYesNofield] field in place but set its
visible property to false.

make sure all three boxes are the same size and layer them on top of
each other

change the form property from datasheet to continuous form

hope this helps
bobh.
Feb 20 '08 #4
Simply use Conditional Formatting. Look it up in Access Help.

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
"TD" <dl**@adsi-sc.comwrote in message
news:d3******** *************** ***********@i7g 2000prf.googleg roups.com...
>I am trying to change the forecolor of a field in a subform that is in
datasheet view. I am using Access 2007. I have tried everything I
can think of to do this but the text still appears in black. I need
it to appear in red if the field has the word "YES" in it. Is there
something in Access 2007 that keeps this from working?????

Feb 21 '08 #5

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

Similar topics

3
4170
by: Sam Gledhill | last post by:
Hi, I'm hoping someone can help me out. I have a database with a form. This form has no recordsource (I'm using it as a complex MsgBox). It has a single textbox of type Date. It also has three unrelated subform that are filtered according to the date entered in the form's text box. By using after update events, I've been able to allow users to change the date in the textbox and alter records from the day throughout three other tables. ...
4
20791
by: codemonkey | last post by:
TIA! I would like to know if there is a way to dynamically change the colors of Subform items? I have already set in place Conditional Formatting so each row has an alernating color scheme, but what I am looking for is a way <behind a button click event> to dynamically change the Subform's color scheme so the listing can have color choices. Is this even possible? Thanks again to anyone who may be able to help Wes
2
4399
by: Galina | last post by:
Hello I have an application in MS Access 2000. I have a form, which includes a subform. The subform is based on a table, but locked for any editing. There is Edit button. When clicked, it starts a separate unbound form with all the fields, which are on the subform. The fields are filled in with data programmatically. User edits. Edited fields are copied into fields on the subform programmatically as well. I need to catch change in one of...
25
10275
by: Lyn | last post by:
Hi, I am working on a genealogy form. The only table (so far) lists everybody in the family, one record per person. Each record has an autonum ID. The parent form (frmMainForm) displays the data in each record, which includes the ID of the father and the mother (who also have records in the table). One record per form. I have a Tab Control in the form, and in one of the tabs I have a subform (sfmSiblings) in which I wish to list...
3
3318
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 the field should only be showing one or the other (date or time). Even on the back end of the database where the column properties are, I have chosen the smallest date/time formats. When the aspx page runs, it shows the date and time (ie:in a...
9
9717
by: Ecohouse | last post by:
I have a main form with two subforms. The first subform has the child link to the main form identity key. subform1 - Master Field: SK Child Field: TrainingMasterSK The second subform has a master-child link to the first subform. subform2 - Master Field: subTrainingModule.Form!TrainingModuleTopicSK Child Field: TrainingModuleTopicSK
4
5888
by: Henrootje | last post by:
I have a REPORT with in it a subFORM Now I have this label (lblMonth) that I want to change. How should I do this? What would be the proper event to do this? The lblMonth should contain the name of the month as jan 07 Any ideas?
8
23827
by: Simon | last post by:
Dear reader, The syntax for the VBA code to change the RowSource of a Form is: Forms!FormName..RowSource = "TableOrQueryName"
7
16171
by: heinemans | last post by:
Hi there, main form name = reserveringen subform name = subform reserveringen main form fields are: datetot, datevan, fietscode. Subform fields are: dateuit, datemin, fietsid Now i want to fill in data in the main form fields and populate the data into the subform fields after the fietsid is typed. Because the data in 2 first to field is most of the time the same data for each record. Only the fietsid is every tim ea new uniek number.
0
9699
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
9562
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10304
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...
1
10285
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 most users, this new feature is actually very convenient. If you want to control the update process,...
0
9114
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
7598
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
5494
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
4270
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
3
2966
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.