From: Bateman28 on
Hi

I am trying to figure out how to change certain fields when a tickbox is
ticked to the value of True. My Tickbox is named WDAccessed.

I have tried the following;

Private Sub WDAccessed_Click()

If Me![WDAccessed] = True Then

Me![FullName.BackColour] = 255 Colour Red
Me![WorkDueDate.BackColour] = 255 Colour Red

Else

Me![FullName.BackColour] = -2147483643 Normal BackColour
Me![WorkDueDate.BackColour] = 2147483643 Normal BaclColour

End If
End Sub

Any help would be great.....Cheers
From: Dirk Goldgar on
"Dennis" <Dennis(a)discussions.microsoft.com> wrote in message
news:6A8C0B46-68E6-4AF8-946A-9C922614FA1B(a)microsoft.com...
> One thing I did notice is
> that for Access 2007, I needed to use an "RGB" statement and specify the
> individual color component values. I absolutely HATE doing it that way.


I'm not following you. I don't find that I have to do that, when specifying
colors in code. The property sheet shows colors as "#rrggbb" values, and I
can assign those colors in code as &Hrrggbb, but I don't have to, nor do I
have to use RGB().

--
Dirk Goldgar, MS Access MVP
Access tips: www.datagnostics.com/tips.html

(please reply to the newsgroup)

From: Dennis on
For some reason, when I tried that approach in 2007, it didn't like it
(grrrr). I have no idea why. But your method is far better IMO. Maybe I can
play with it some more and "convince" VBA in 2007 to like it.


"Dirk Goldgar" wrote:

> "Dennis" <Dennis(a)discussions.microsoft.com> wrote in message
> news:6A8C0B46-68E6-4AF8-946A-9C922614FA1B(a)microsoft.com...
> > One thing I did notice is
> > that for Access 2007, I needed to use an "RGB" statement and specify the
> > individual color component values. I absolutely HATE doing it that way.
>
>
> I'm not following you. I don't find that I have to do that, when specifying
> colors in code. The property sheet shows colors as "#rrggbb" values, and I
> can assign those colors in code as &Hrrggbb, but I don't have to, nor do I
> have to use RGB().
>
> --
> Dirk Goldgar, MS Access MVP
> Access tips: www.datagnostics.com/tips.html
>
> (please reply to the newsgroup)
>
From: Dirk Goldgar on
"Dennis" <Dennis(a)discussions.microsoft.com> wrote in message
news:1F337702-2338-492D-99CD-2634E3D26676(a)microsoft.com...
> For some reason, when I tried that approach in 2007, it didn't like it
> (grrrr). I have no idea why. But your method is far better IMO. Maybe I
> can
> play with it some more and "convince" VBA in 2007 to like it.

I dunno. I tested with Access 2007. Maybe there was something specific you
did wrong, or else I'm not understanding you.

--
Dirk Goldgar, MS Access MVP
Access tips: www.datagnostics.com/tips.html

(please reply to the newsgroup)