How to set color of field?

In ObjectPal I used the 'Arrive' event to set the color of a field or a 
record in a child table.  This allowed the color to vary from one record to 
the next in a datasheet view.

In Access, the 'On Current' event only works in form view.  It doesn't work 
in datasheet view.  The 'Format' event is only available in Report objects. 
The 'Conditional' format only allows three alternatives.

How can Access vary colors from one record to the next in a datasheet, or 
datasheet-like view?


0
WDSnews
4/22/2010 12:10:29 AM
access 16762 articles. 2 followers. Follow

4 Replies
1078 Views

Similar Articles

[PageSpeed] 43

"WDSnews" <wdsnews.0640@oregoncity.com> wrote in message 
news:eKrd4Ab4KHA.4016@TK2MSFTNGP05.phx.gbl...
> In ObjectPal I used the 'Arrive' event to set the color of a field or a 
> record in a child table.  This allowed the color to vary from one record 
> to the next in a datasheet view.
>
> In Access, the 'On Current' event only works in form view.  It doesn't 
> work in datasheet view.  The 'Format' event is only available in Report 
> objects. The 'Conditional' format only allows three alternatives.
>
> How can Access vary colors from one record to the next in a datasheet, or 
> datasheet-like view?


Use a Continuous Form, and make it look as much like a datasheet view as you 
like.  Then you can use conditional formatting, but if that's too limited 
for you, it could end up being hard to do what you want.

-- 
Dirk Goldgar, MS Access MVP
Access tips: www.datagnostics.com/tips.html

(please reply to the newsgroup)

0
Dirk
4/22/2010 8:15:49 PM
well, that's why I mentioned the three alternative limit of "conditional 
formatting".  It won't work for what I need.

It's ok if it "ends up being hard" to do what I want... so long as there's a 
way.  Can you point me in a direction that might be possible to format or 
color each record differently in a datasheet-like view?




"Dirk Goldgar" <dg@NOdataSPAMgnostics.com.invalid> wrote in message 
news:DCB802FC-F6B2-4708-A52B-629382CD5137@microsoft.com...
> "WDSnews" <wdsnews.0640@oregoncity.com> wrote in message 
> news:eKrd4Ab4KHA.4016@TK2MSFTNGP05.phx.gbl...
>> In ObjectPal I used the 'Arrive' event to set the color of a field or a 
>> record in a child table.  This allowed the color to vary from one record 
>> to the next in a datasheet view.
>>
>> In Access, the 'On Current' event only works in form view.  It doesn't 
>> work in datasheet view.  The 'Format' event is only available in Report 
>> objects. The 'Conditional' format only allows three alternatives.
>>
>> How can Access vary colors from one record to the next in a datasheet, or 
>> datasheet-like view?
>
>
> Use a Continuous Form, and make it look as much like a datasheet view as 
> you like.  Then you can use conditional formatting, but if that's too 
> limited for you, it could end up being hard to do what you want.
>
> -- 
> Dirk Goldgar, MS Access MVP
> Access tips: www.datagnostics.com/tips.html
>
> (please reply to the newsgroup)
> 


0
WDSnews
4/22/2010 11:48:41 PM
WDSnews,

You could do this by using a Flex Grid control instead of a Continuous
form. Have a look at my Flex Grid Demo program at :-

http://www.rogersaccesslibrary.com/forum/forum_topics.asp?FID=21&SID=5debzz2c87c6957859f13b1d2zcccfb4

for some examples, (you will need to write a bit of VBA code though).

Peter Hibbs.


On Thu, 22 Apr 2010 16:48:41 -0700, "WDSnews"
<wdsnews.0640@oregoncity.com> wrote:

>well, that's why I mentioned the three alternative limit of "conditional 
>formatting".  It won't work for what I need.
>
>It's ok if it "ends up being hard" to do what I want... so long as there's a 
>way.  Can you point me in a direction that might be possible to format or 
>color each record differently in a datasheet-like view?
>
>
>
>
>"Dirk Goldgar" <dg@NOdataSPAMgnostics.com.invalid> wrote in message 
>news:DCB802FC-F6B2-4708-A52B-629382CD5137@microsoft.com...
>> "WDSnews" <wdsnews.0640@oregoncity.com> wrote in message 
>> news:eKrd4Ab4KHA.4016@TK2MSFTNGP05.phx.gbl...
>>> In ObjectPal I used the 'Arrive' event to set the color of a field or a 
>>> record in a child table.  This allowed the color to vary from one record 
>>> to the next in a datasheet view.
>>>
>>> In Access, the 'On Current' event only works in form view.  It doesn't 
>>> work in datasheet view.  The 'Format' event is only available in Report 
>>> objects. The 'Conditional' format only allows three alternatives.
>>>
>>> How can Access vary colors from one record to the next in a datasheet, or 
>>> datasheet-like view?
>>
>>
>> Use a Continuous Form, and make it look as much like a datasheet view as 
>> you like.  Then you can use conditional formatting, but if that's too 
>> limited for you, it could end up being hard to do what you want.
>>
>> -- 
>> Dirk Goldgar, MS Access MVP
>> Access tips: www.datagnostics.com/tips.html
>>
>> (please reply to the newsgroup)
>> 
>
0
Peter
4/23/2010 8:05:54 AM
"WDSnews" <wdsnews.0640@oregoncity.com> wrote in message 
news:eWmLXZn4KHA.5548@TK2MSFTNGP04.phx.gbl...
> well, that's why I mentioned the three alternative limit of "conditional 
> formatting".  It won't work for what I need.
>
> It's ok if it "ends up being hard" to do what I want... so long as there's 
> a way.  Can you point me in a direction that might be possible to format 
> or color each record differently in a datasheet-like view?


Do you want to color records, or specific controls in those records?

One way to do this sort of thing without using conditional formatting is to 
put a set of calculated text boxes, disabled and locked, behind the controls 
in the detail section.  Each of these text boxes, which I'll refer to as the 
"highlighting" text boxes, would have these properties:

    Back Style: Transparent
    Font Name: Terminal
    Font Size: (big enough to completely fill the height of the text box)
    Fore Color: (your chosen highlighting color)
    Control Source:
            =IIf(<your condition for highlighting>, String(255,219),Null)

All of the highlighting text boxes would be sent to the back;  they may 
be -- normally would be -- all on top of each other.  Each one has its 
controlsource set to evaluate a distinct condition and return a 
textbox-filling string if that conditon is true.  You can have as many of 
these highlighting text boxes as you have distinct conditions requiring 
different highlighting.  You may choose to make each one big enough to 
completely cover the detail section, so that the whole section appears a 
different color for each record.

You may choose to have the other controls on the form's detail section have 
a transparent back style, in which case the highlighting color will show 
through for all except the control that has the focus.  Or you may choose to 
have a normal back style for those controls, in which case only the 
background of the detail section will show the color.

-- 
Dirk Goldgar, MS Access MVP
Access tips: www.datagnostics.com/tips.html

(please reply to the newsgroup)

0
Dirk
4/23/2010 3:49:40 PM
Reply:

Similar Artilces:

How do I set up an argument which asks for multiple criteria
I am trying to use an argument that asks for one of three criteria (2345P, 8319T, or 7026J) in cell C108, and if it finds it, enters the amount of yet another cell, G108 into cell K108, and if not enters 0 into cell K108. It seems there are too many arguments for the "if" argument, and I can't seem to get the "lookup" argument to work either. Is there another argument I should be working with? Thanks -- Diver Try: =IF(OR(C108="8319T",C108="2345P",C108="7026J"),G108,0) "bj" wrote: > try in K108 > =if(or(c108=&qu...

setting up new outlook mail account
i can not set up a new account on my outlook, i keep saying establish network connection with a correct sign but searching for my mail account shows X can you please advise Are you trying to setup a POP3 mail account or an Exchange account? Also, what version of Outlook are you using? "rashid" <rashid@discussions.microsoft.com> wrote in message news:C59D04C0-C1C9-4BD1-AE00-2009D25B221D@microsoft.com... > i can not set up a new account on my outlook, i keep saying establish > network > connection with a correct sign but searching for my mail account shows X > ...

OWA Set Rule problem
I have successfully install the Exchange 2003 with SP1 in the Windows Server 2003. Anything alright exclude the rules function in OWA. I try to set the rules from any then "move to" or "copy to" specify folder are no problem, but "forward to" other email address, its don't work. I try to input the email address in the contact and then select from the contact, but the result also don't work. The rules can save and I can receive the incoming email in the Exchange 2003/Outlook or OWA, but it don't forward to my specify email address. I try to...

How do I set the 'Set Synchronizing Client' field
We have a number of outlook clients using CRM that have the 'Set Synchronizing Client' select box greyed out. We need to tick them so that they are able to synchronize tasks etc. Can any one help me find out why these are greyed out and then set them so that they can synchronize thanks In my experience, that checkbox is always greyed out for the first install that is performed for a user. The only time that checkbox becomes active is if a second copy of CRM is installed for a user who already has CRM installed on another PC.... Normally the box is checked and grey. If that is...

How to set backcolour
Hello All I have a continuous form containing a number field (long integer) called [v_colour]. This field contains the number of a certain colour - as per the numbers that are used in the format properties for back colour etc. I would like to set the back colour for the form's [v_colour] text box to be the value of the field: e.g. If the value of [v_colour] in the first record is 255, I want the back colour of the textbox for that record to be bright red. I tried this as the OnLoad event for the form: [v_colour].backcolour = [v_colour].value .... but this resulted in the back colour of...

Applying Percent Decrease Across Set Periods
I have a column which includes dates when items were purchased. I have used the DATEDIF function to find the number of years between that date and today's date. I now want to decrease the purchase amount 10% for every year calculated via the DATEDIF function. Any ideas, is this possible, why can't I think...? -- Hunt&amp;Peck ------------------------------------------------------------------------ Hunt&amp;Peck's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=32961 View this thread: http://www.excelforum.com/showthread.php?threadid=527873 ...

The Pivot Table field name is not valid, #2
I am receiving the above error message, but don't understand why. My data is in columns, organised as a list and the columns are labelled. What do I have to do to get over this? Thanks Denise Hey Deniseh... The Pivot table is looking for a concentric group of columns and cells, my belief without seeing the data is that you have a column in the data range that does not have heading... check to verify that each the first cell in each column of the pivot table data range has a value populated -- Thanks for your help - Joe Mac "deniseh" wrote: > I am receiving the ab...

Set Regional Settings but not Language
Hi I have a multi-language APP en-US, es-ES, it-IT I usually change Languages and Locales by using the CultureInfo to switch Languages System.Globalization.CultureInfo myCI = new System.Globalization.CultureInfo("es-ES"); My issue is - what if the user wants to View App in english and use the Regional Options on a PC in say Spain ??? If I change the CultureInfo to en-US then they can view APP in English ( English satelite assemblies) but date and numbers will be in US format If I change the CultureInfo to es-ES then date and numbers will be in Spain forma...

Work Hours setting excludes specified hours from Scheduling
I am miffed by this problem. I specify a work hour schedule for a user. When I schedule a CRM User as a Resource for a Service in Scheduling of a Service Activity with Requested Time of ASAP and click Find Available Times, the values for Avilable Times returned are outside of the Work Hours I specified for the user and not within the work hours. When I drill into the Work Hours for this User, the Calendar view shows Cross Day rather than 8:00AM - 5:00PM I speciied for work hours and editing the hours reveal the correct hours in the Work Hours. What gives? Never mind. Figured out w...

Reading Pane Settings
I did a search for an answer to this question and have not found one. If I missed an answer already posted, please direct me to the right place. I have Outlook 2007 and set up the "right" reading pane for my e-mail. Now when I go to my calendar it is set up the same way - calendar on the left (same size as the inbox) and then there is a blank space to the right that is the size of the reading pane/preview. To the right is the to-do bar (which I have no problem with). I don't know why there is a reading/preview pane on the calendar when there is nothing to preview, and I...

color code meetings by subject
If someone sends me a meeting announcement, can I have outlook read the text and make it lue in my calendar if a specific string appears, green for another string, etc.? If you let Outlook accept the meetings automatically or you accept them manually, you can use Automatic Formatting to color the label by subject in Outlook 2002 or 2003. Otherwise, it would require custom VBA code, not a simple automatic formatting rule. -- Sue Mosher, Outlook MVP Author of Microsoft Outlook Programming - Jumpstart for Administrators, Power Users, and Developers http://www.outlookcode.com/...

Outlook "Arrange By" option does not retain its setting
In outlook 2007, I use a custom view for my inbox, and I have the Group By option checked to"Automatically group according to arrangement." This has been workn flawlessly until today, when I realized Outlook did not like a particular mouse click; perhaps I clicked on the border of two options or some other anomoly that caused the window toflash once. The end result was that my Arrange By option changed to "From" when I had previously set it to "Conversation." Now, whenever I hange it backto "Conversation," leave the inbox and come back, ...

How do I set OOR
I have searched the help menu and have had no luck finding out how to set my outlook 200 to send an OOR (Out of Office Reply) Any assistance would be great If you are in an Exchange environment (ask your administrator if you do notknow) you can set the Out of the Office Assistant which is located under Tools. If you are not in an Exchange environment you can create a rule that replies on all e-mails. The downside of this is that you'll have to have your Outlook open all the time for the rules to process. Make sure you set some exceptions (for instance based on the subject field so ...

How do I color specific data series based on location on data she
I have about 150 data series in a chart and I want to color e.g. 10 of them red based on where in the data sheet they are located, e.g. data i column J to T. Is there an easy way to do this? Format one of them the way you want. Select the other series you want to change and press F4. This may be difficult with 150 series, however. "Havard" <Havard@discussions.microsoft.com> wrote in message news:8F62297E-447B-4507-8D4A-A2C9A38C08EA@microsoft.com... > I have about 150 data series in a chart and I want to color e.g. 10 of them > red based on where in the data sheet ...

interactive buttons, multiple sets
hi folks I'm sure one of you good folks will save my bacon as usual I have a series of websites, all of which exhibit the same odd behavior with interactive buttons. I have a bunch of buttons in the left margin, each of which pulls up ( lets call it ) a chapter, and in each 'chapter' are a number of related pages. On the top of each page is an imbedded page which has 'page numbers' for all the 'pages' in that chapter. So, it's a grid where the 'vertical' buttons in the left margin and the 'horizontal' buttons at the top comb...

Bring back simple calendar color labels for outlook appointments.
The consolidation of Outlook labels and categories in 07 as compared to 03 results in having to use many more mouse clicks to apply basic color codes to outlook calendar appointments. I use as many as 30 categories for various projects and office jobs that change over time and whose colors would not be useful to try to remember or apply to appointments. Rather, being able to code a few simple colors for things like "in office appointment" "out of office but in town appointment" "personal reminder," "out of town travel hold," "office ...

Reminder Time vs Due By Field #2
I'm using O2003. For a contact, there is the Due by Field. There is also a Reminder Time field. If you update the Due By field, it updates the Reminder Time field. However, if you update the Reminder Time field, it does not update the Due By field. By default for a contact, you have access to the Due By field. The Reminder field is avaialble, but you have to manually add it. In Tasks, it seems to work the same in that if you update the Due By field, it updates the Reminder Time field. However, if you update the Reminder Time field, it does not update the Due By field. However, you have a...

Set Focus
I have text box that I input data into and I was wondering if it is possible to set focus to the text box and avoid clicking on the box. I thought the term is Set Focus, but can't find any information or example that would help in doing so. Any help would be appreciated .. PPT 2003. Look at the following page for code to set focus on a text box: http://officeone.mvps.org/vba/activate_shape.html - Chirag PowerShow - View multiple PowerPoint slide shows simultaneously http://officeone.mvps.org/powershow/powershow.html "Phil K" <PhilK@discussions.microsof...

Set published amount of calendar information
Hey guys! Is there any way I can have Exchange 2000/2003 force the amount of time published in the outlook calendar? I know that you can go into the the calendar options and set the amount you want published, but is there a way to have exchange require the amount that is published so that I could get everyone to publish a year's worth of calendar data instead of one person being set at 2 months and another at 6 months and another at 12? Thanks! Mike On Thu, 29 Jun 2006 06:18:02 -0700, Mike <Mike@discussions.microsoft.com> wrote: >Hey guys! > >Is there any way I c...

Copy data of some fields on a form to the next record
I have a form used to enter data on a record in which 7 of the fields will contain the exact same data for several sebsequent records. Instead of having to re-enter repetative data for several sebsequent records, I need a checkbox (or some indicator) that would set a control that when checked, it would tell the database that it should carry the data in a certain set of fields (the 7) to the next record. For instance, when you order an item online using a credit card and if you check the box the delivery address information you just entered will repeat or copy to the billing address f...

Publisher 2003 Need to set business card to Avery 5371 setting
I need to set the print settings so the business cardd that I created will print on Avery 5371 business cards Okay.........and your question is? -- JoAnn Paules MVP Microsoft [Publisher] "Jonathan" <Jonathan @discussions.microsoft.com> wrote in message news:187615DD-9EF1-42A2-8436-78E6E6C6ACE4@microsoft.com... >I need to set the print settings so the business cardd that I created will > print on Avery 5371 business cards Page setup, business cards, click change copies per sheet, type > .5 top, .75 side, zero gaps. Avery 5371 is a standard business card s...

Different colors on the x axis titles
Is there a way to have different colors on the titles of the x axis? For instance, if the titles are months, Jan, Feb, Mar, etc., is it possible to have January in red font, February in blue font, March in green font, etc. Thanks for any help. I should note that I am using Excel 2000 "SK" <Nospam> wrote in message news:%23$CetoM8DHA.1356@tk2msftngp13.phx.gbl... > Is there a way to have different colors on the titles of the x axis? For > instance, if the titles are months, Jan, Feb, Mar, etc., is it possible to > have January in red font, February in blue font, March...

Setting the Settings
Really quickly: How (exactly) does one get Publisher to remember the page settings I want. ie. every time I open a new document, I get centimeters, and usually, I'd prefer inches. I have not been able to find a "Save Settings" option anywhere. Can anyone help? thomas In Publisher 2000 it's Tools Options General tab Measurements unit box - select inches. OK That should do it. -- Don -------- Vancouver, USA - One of the great cities in one of the 45+ countries in America! "ThomasL" <tlammert@netcom.ca> wrote in message ne...

Fill Color a Range
I want to fill a range with a color. I know how to do that but I don't know how to keep the grid lines visible in that range. It seems I would need a transparent color or something like that. How can I fill a range with a color that will allow the grid lines to show through? Thank you. The only way is to give the gridlines an alternative colour of their own. -- HTH RP (remove nothere from the email address if mailing direct) "Jack Gillis" <XXXXXXXX@widomaker.com> wrote in message news:112bdn5bm4udrff@corp.supernews.com... > I want to fill a range with a ...

"Object or class does not support the set of events" Quick Question
All, I built a MS Access database in MS Access 2003, which I have set up in a shared folder. I have a form with some standard components such as text boxs, bottons. When a user updates the form I wish to record the time/date and username in the record. I have posted a copy of the code I'm using for the "BeforeUpdate" event below. Now this works fine on my machine and updates without a problem. However when a user on another machine (also using MS Access 2003) tries to update the same field, he gets the following error: "The expression Before Update you entered as the eve...