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  

datasheet column color



 
 
Thread Tools Display Modes
  #1  
Old October 11th, 2006, 08:33 PM posted to microsoft.public.access.forms
StuJol
external usenet poster
 
Posts: 122
Default datasheet column color

i have a Access2003 from that is displayed in datasheet view. i have for
example column 1, column 2 and column 3.

im trying to mimic a form i have on paper and column 3 is grayed out to
indicate it is to be used under a specific condition

i there a way to have a full column in datasheet view a certain color
whether or not it contains any data?
  #2  
Old October 12th, 2006, 10:25 PM posted to microsoft.public.access.forms
Peter Hibbs
external usenet poster
 
Posts: 871
Default datasheet column color

Not quite sure what you are asking for but a Flex Grid control will allow you
to show rows and/or columns in different colours. See my Flex Grid Demo
database at :-

http://www.rogersaccesslibrary.com/O...ibbs,Peter%20S
for some ideas.

--
Peter Hibbs


"StuJol" wrote:

i have a Access2003 from that is displayed in datasheet view. i have for
example column 1, column 2 and column 3.

im trying to mimic a form i have on paper and column 3 is grayed out to
indicate it is to be used under a specific condition

i there a way to have a full column in datasheet view a certain color
whether or not it contains any data?

  #3  
Old October 13th, 2006, 01:28 AM posted to microsoft.public.access.forms
Stephen Lebans
external usenet poster
 
Posts: 619
Default datasheet column color

Set the Enabled property of the TextBox control in Column 3 to NO. This will
grey out the contents of this field. Alternatively, if you want more control
over the "Disabled" appearance, you can use Conditional Formatting.

In form Design view, select the TextBox control in Column 3
With the control selected, goto the Format Menu and select Conditional
Formatting

In the CF GUI dialog select Expression Is, then call a small Custom
function passing a pointer to the TextBox control in Column 3. THe example
below assumes the name of the TextBox control is txtcusName. Change it to
match yours.
ColorColumn([txtcusName])

Create the custom function within a standard Code module. Simply have it
return TRUE to enable CF for this control, and every instance of this
control in Column 3.

Public Function ColorColumn (ctlCF As Control) As Boolean
ColorColumn = TRUE
End FUnction



--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.


"StuJol" wrote in message
...
i have a Access2003 from that is displayed in datasheet view. i have for
example column 1, column 2 and column 3.

im trying to mimic a form i have on paper and column 3 is grayed out to
indicate it is to be used under a specific condition

i there a way to have a full column in datasheet view a certain color
whether or not it contains any data?



 




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 01:08 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.