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 / November 2007

Tip: Looking for answers? Try searching our database.

Conditional formatting

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
RSunday - 26 Nov 2007 15:37 GMT
I would like to hide/show a line based on the value of a control in a
continuous form.

Conditional formatting is only enabled for text boxes. So how can that be
done?
Stephen Lebans - 26 Nov 2007 22:41 GMT
Technically, you cannot selectively hide/show a control on a form in
Continuous view as the FormatConditions object does not expose a "Visible"
property. In your specific case, a possible workaround is to use the
Background color of the standard TextBox control, set to the desired line
color, sized vertically to simulate a line of the desired height. Now you
can apply Conditional Formatting to the control, setting the Background
color property to the same as the form's Background color to simulate a
Visible property. The CF sample on my site shows you how to accomplish this.
Make sure you set the Enabled property of the contol to  NO so that the user
cannot indavertently setfocus to the control.

An alternative to above is the use of the "underline" character of a font
and set the FormatConditions's exposed Forecolor property as described
above.

If you do not need to have the "Line" appear behind a control(s) then a
Bitmap representing a "Line" embedded as an OLE object could also be used.

Signature

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

>I would like to hide/show a line based on the value of a control in a
> continuous form.
>
> Conditional formatting is only enabled for text boxes. So how can that be
> done?
 
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.