Conditional formatting

R

RSunday

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?
 
S

Stephen Lebans

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.

--

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top