A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

back color in cells/fields on datasheet view



 
 
Thread Tools Display Modes
  #1  
Old October 2nd, 2006, 04:30 PM posted to microsoft.public.access.forms
Marco Silva
external usenet poster
 
Posts: 44
Default back color in cells/fields on datasheet view

Hi. I would to know if it is possible to set a back color in cells/fieds when
the form view is set to datasheet? I know that if the view is set to single
form it works, but in datasheet view I can't.

Another thing in the same form with datasheet view is, if I've got to
line/records and one field/column as the same value can I set a back color to
the whole line/record?

Regard,
Marco
  #2  
Old October 2nd, 2006, 07:06 PM posted to microsoft.public.access.forms
Barry Gilbert
external usenet poster
 
Posts: 379
Default back color in cells/fields on datasheet view

"Marco Silva" wrote:

Hi. I would to know if it is possible to set a back color in cells/fieds when
the form view is set to datasheet? I know that if the view is set to single
form it works, but in datasheet view I can't.


This can be done for datasheet views. When in design mode, you can select
each control and set its back color or use Conditional Formatting on any
control. There is no difference from Form view.

Another thing in the same form with datasheet view is, if I've got to
line/records and one field/column as the same value can I set a back color to
the whole line/record?


The easiest eay to do this is to create a column in your form's query that
returns True if it is a duplicate. You can get some idea of how to do this by
creating a query using the Find Duplicates Query Wizard. The result of this
should be that the new column shows a checkbox which is checked if the record
is a duplicate.

Back in your form, select all the controls in the datasheet view and click
Format, Conditional Formatting. Select Expression Is and enter a reference to
the new true/false column, like this:
MyDuplicateRecColumn = True
(replace the name of the column with your own)

Then apply a back color format when this expression is true by choosing a
color from the paint bucket dropdown.

For what it's worth, you should probably design the tables, indexes, and
relationships better to prevent duplicates in the first place. This sometimes
isn't possible, if you're importing or merging data from other sources, but
it's the right way to design the database.

Barry
  #3  
Old October 2nd, 2006, 07:40 PM posted to microsoft.public.access.forms
Marco Silva
external usenet poster
 
Posts: 44
Default back color in cells/fields on datasheet view

Hi. I have primary keya and relationships. Sometimes I need to have to lines
with the same data.

About back colors, I just wanted to show to users that those fieds were
filed automatically.

Thanks.

"Barry Gilbert" wrote:

"Marco Silva" wrote:

Hi. I would to know if it is possible to set a back color in cells/fieds when
the form view is set to datasheet? I know that if the view is set to single
form it works, but in datasheet view I can't.


This can be done for datasheet views. When in design mode, you can select
each control and set its back color or use Conditional Formatting on any
control. There is no difference from Form view.

Another thing in the same form with datasheet view is, if I've got to
line/records and one field/column as the same value can I set a back color to
the whole line/record?


The easiest eay to do this is to create a column in your form's query that
returns True if it is a duplicate. You can get some idea of how to do this by
creating a query using the Find Duplicates Query Wizard. The result of this
should be that the new column shows a checkbox which is checked if the record
is a duplicate.

Back in your form, select all the controls in the datasheet view and click
Format, Conditional Formatting. Select Expression Is and enter a reference to
the new true/false column, like this:
MyDuplicateRecColumn = True
(replace the name of the column with your own)

Then apply a back color format when this expression is true by choosing a
color from the paint bucket dropdown.

For what it's worth, you should probably design the tables, indexes, and
relationships better to prevent duplicates in the first place. This sometimes
isn't possible, if you're importing or merging data from other sources, but
it's the right way to design the database.

Barry

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 11:57 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.