Conditional Formatting Issue

L

LukeM

Hi,

I've got a problem to do with conditional formatting. I'm using an
Access2000 database in Access 2003.

If I set up a conditional format on a control which has enabled=No,
Locked=Yes (so it looks normal but you can't touch it), then I run into
problems.

If I set the enabled field of the conditional format to false, then
when the condition falls true, it will set enabled=false,
locked=false, and not apply the format.

If I set it to true, then when the condition falls true, it sets
enabled=true, locked = true.

What I would like, is when the condition falls true, it applied the
formatting, and leaves enabled and locked alone! (That is, enabled=false,
locked=true.)

Any suggestions?

Thanks,
Luke.
 
F

fredg

Hi,

I've got a problem to do with conditional formatting. I'm using an
Access2000 database in Access 2003.

If I set up a conditional format on a control which has enabled=No,
Locked=Yes (so it looks normal but you can't touch it), then I run into
problems.

If I set the enabled field of the conditional format to false, then
when the condition falls true, it will set enabled=false,
locked=false, and not apply the format.

If I set it to true, then when the condition falls true, it sets
enabled=true, locked = true.

What I would like, is when the condition falls true, it applied the
formatting, and leaves enabled and locked alone! (That is, enabled=false,
locked=true.)

Any suggestions?

Thanks,
Luke.

If you are doing this in a form's Single Form View, don't use
conditional formatting.
You can use the form's Current Event AS WELL AS the AfterUpdate event
of any control that will affect the value of the control you wish to
change the color of:

If Me![SomeControl] = SomeValue then
Me![OtherControl].Enabled = True
Me![OtherControl].BackColor = vbGreen
Me![OtherControl].Enabled = False
Else
Me![OtherControl].Enabled = False
Me![OtherControl].BackColor = vbWhite
Me![OtherControl].Enabled = True
End If

The above will not work if you are using Continuous or Datasheet view.
 
L

LukeM

Sorry, I probably should have said, I'm using datasheet view. Whilst a
continuous form view might be an option, a single form isn't. Nice
(simple) idea, though.

Luke.


Hi,

I've got a problem to do with conditional formatting. I'm using an
Access2000 database in Access 2003.

If I set up a conditional format on a control which has enabled=No,
Locked=Yes (so it looks normal but you can't touch it), then I run into
problems.

If I set the enabled field of the conditional format to false, then
when the condition falls true, it will set enabled=false,
locked=false, and not apply the format.

If I set it to true, then when the condition falls true, it sets
enabled=true, locked = true.

What I would like, is when the condition falls true, it applied the
formatting, and leaves enabled and locked alone! (That is, enabled=false,
locked=true.)

Any suggestions?

Thanks,
Luke.

If you are doing this in a form's Single Form View, don't use
conditional formatting.
You can use the form's Current Event AS WELL AS the AfterUpdate event
of any control that will affect the value of the control you wish to
change the color of:

If Me![SomeControl] = SomeValue then
Me![OtherControl].Enabled = True
Me![OtherControl].BackColor = vbGreen
Me![OtherControl].Enabled = False
Else
Me![OtherControl].Enabled = False
Me![OtherControl].BackColor = vbWhite
Me![OtherControl].Enabled = True
End If

The above will not work if you are using Continuous or Datasheet view.
 

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