how to set a line visible on continuous forms

D

doppiacoppia

as the title sais, i've got an issue with a line on a continuous form.
I want that line to be visible only on specific records, under
specific conditions, is this possibile ?
 
J

Jeanette Cunningham

Hi,
Conditional formatting is the way to do this sort of thing on a continuous
form. As far as I know, however, it works with controls that hold data from
a table. I'm not sure that it will work with a line, but you could try.
Note: must be using Access 2000 and above.
You could check Stephan Lebans website for anything relating to this topic
at http://www.lebans.com/
or Tony Toews website at http://www.granite.ab.ca/accsmstr.htm

Jeanette Cunningham
 
D

doppiacoppia

Hi,
Conditional formatting is the way to do this sort of thing on a continuous
form. As far as I know, however, it works with controls that hold data from
a table. I'm not sure that it will work with a line, but you could try.
Note: must be using Access 2000 and above.
You could check Stephan Lebans website for anything relating to this topic
athttp://www.lebans.com/
or Tony Toews website athttp://www.granite.ab.ca/accsmstr.htm

Jeanette Cunningham

first of all, thanks for the quick answer!
i had just find out that web site teaching how to use
"FormatCondition" to change controls' looking, under specific
conditions...but, as you know, it works only with TextBox...indeed, a
"line" is an object that doesn't have a FormatCondition field, so it
won't let you change the way it looks...
it seems to me there's no way out to solve it.
 
S

Stephen Lebans

CF does not support the Line control nor does it support a Visible property.
With that being said, there are a couple of possible solutions.

1) Setup a TextBox control that is only a few pixels tall to simulate the
look of a horizontal Line. The control has the Border prop set to None. It
is the Backcolor of the control that is used to create the actual "Line".
When you setup the CF for this control, set the BackColor equal to the
current color of the Background of your form so that it effectively renders
itself Visible/Invisible as desired. Alternatively, you could fill a TextBox
with the underscore character and manipulate it's Text color using the same
logic as above.

2) Create two small "line" BMP's in MS Paint, one for a visible line the
other for a non visible line. Insert these BMP's into an OLE field as an
embedded object. Add the OLE field to your row source, selecting the desired
"line" record as desired.
--

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