Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms / April 2007

Tip: Looking for answers? Try searching our database.

Datasheet - cannot change background color of fields

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Patricia - 23 Apr 2007 14:08 GMT
I have a datasheet that is a subform, I can use the conditional format to
change the format based on the value, however I cannot just shade the
background color of the fields.  I want to shade the fields that will be
locked to the users.  When I am in design view I click on the field and shade
it - it looks like it works, but when I go to form view, the shading is gone.
I have found the only way to shade the fields is to use the conditional
format and put in 2 criteria - if the value is null or not null - then it
works.  However, I cannot do this for all the fields since some already have
conditional formats.  
Thanks
tina - 23 Apr 2007 14:18 GMT
add the following procedure to your form's module. the color is light blue,
you can change it to whatever you want, of course.

Private Sub Form_Load()

   Me.DatasheetBackColor = 16777164

End Sub

hth

> I have a datasheet that is a subform, I can use the conditional format to
> change the format based on the value, however I cannot just shade the
[quoted text clipped - 6 lines]
> conditional formats.
> Thanks
Patricia - 23 Apr 2007 14:30 GMT
Is there a way to do this for just one field and not the entire datasheet?

Thanks

> add the following procedure to your form's module. the color is light blue,
> you can change it to whatever you want, of course.
[quoted text clipped - 20 lines]
> > conditional formats.
> > Thanks
John W. Vinson - 23 Apr 2007 17:42 GMT
>I have a datasheet that is a subform, I can use the conditional format to
>change the format based on the value, however I cannot just shade the
[quoted text clipped - 6 lines]
>conditional formats.  
>Thanks

You've got a lot more flexibility in this regard if you use a Continuous Form
rather than a datasheet. You can set the properties of each control
independently of the others; you still get conditional formatting if you want
it. A Continuous Form can be made to look very much like a datasheet if you
wish.

The one thing you lose is the ability for a user to resize textboxes... but
that's an ability that the user maybe shouldn't have anyway!

            John W. Vinson [MVP]
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.