how can i apply conditional formatting by code ?

M

mezzanine1974

Say that there is a table T_PERSONAL [Name (text), Surname (text),
Salary (integer)].
I created a Tabular Form (F_PERSONAL) which retrieves information
from
T_PERSONAL.
I want to put a image for a specific record on the form, if the
record
satisfy some specific criteria. For other record which does not
satisfy the criteria, image should be invisible.
Say that, if [Name (text)] ~text13~ is "ALBERT", Image Object
~Image13~ should be visible. I dont suppose that Image Object should
be included in T_PERSONAL. It will be inserted manualy during design
stage of Tabular Form.
I would not ask this question, if access would enable me to apply
Conditional Formatting for Image Objects, which we insert manually.

Do we need to write such code?
If Form_F_PERSONAL.text13.Value = "ALBERT" Then
Form_F_PERSONAL.Image13.Visible = False


If so, please tell me to which event i should insert? If not, what is
the way to solve this problem please ?
 
M

missinglinq via AccessMonster.com

Two problems: Conditional Formatting is only available thru the Format Menu,
and as it's name indicates, it only allows for the formatting of
text/background colors and text bold/italic/underline attributes, plus
enabling of the control, not it's visibility. Secondly, in a continuous form
(which is what a Tabular form actually is) when the image is visible, a copy
of it will be visible on each row of data, not just the row with the record
you're using for the criteria! Datasheet and continuous/tabular forms are not
really designed for these kinds of maniuplation.

--
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000

Message posted via AccessMonster.com
 

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