This line looks wrong:
Section.backcolor = RGB(255, 255, 255)
You need to specify which form and which section e.g.:
Forms(doc.Name).Section(acDetail).backcolor = RGB(255, 255, 255)
> I'm trying to change the backcolour of all my forms and am using this code
> in a module
[quoted text clipped - 30 lines]
> Thanks
> Tony
Tony Williams - 22 Jul 2007 14:12 GMT
Thanks Baz that worked just fine! How would I amend that line to change the
backcolour of the form header?
Cheers
Tony
> This line looks wrong:
>
[quoted text clipped - 40 lines]
>> Thanks
>> Tony
Baz - 22 Jul 2007 16:15 GMT
Forms(doc.Name).Section(acHeader).backcolor = RGB(255, 255, 255)
> Thanks Baz that worked just fine! How would I amend that line to change the
> backcolour of the form header?
[quoted text clipped - 44 lines]
> >> Thanks
> >> Tony
Tony Williams - 22 Jul 2007 16:35 GMT
Hi Baz this gives an error message
2462-The section number you entered is invalid
Any ideas?
Thanks
Tony
> Forms(doc.Name).Section(acHeader).backcolor = RGB(255, 255, 255)
>
[quoted text clipped - 48 lines]
>> >> Thanks
>> >> Tony
Baz - 23 Jul 2007 09:02 GMT
That's because it's found a form which doesn't have a header. Just trap the
error and ignore it.
> Hi Baz this gives an error message
> 2462-The section number you entered is invalid
[quoted text clipped - 53 lines]
> >> >> Thanks
> >> >> Tony
Tony Williams - 23 Jul 2007 09:18 GMT
Thanks Baz
Tony
> That's because it's found a form which doesn't have a header. Just trap
> the
[quoted text clipped - 59 lines]
>> >> >> Thanks
>> >> >> Tony
Tony Williams - 22 Jul 2007 14:17 GMT
And what about changing the backcolour of all tabcontrols?
Thanks, really appreciate this
Tony
> This line looks wrong:
>
[quoted text clipped - 40 lines]
>> Thanks
>> Tony
Baz - 22 Jul 2007 16:25 GMT
No can do, tab controls don't support background colours.
> And what about changing the backcolour of all tabcontrols?
> Thanks, really appreciate this
> Tony
Tony Williams - 22 Jul 2007 16:33 GMT
Thanks Baz for that
Tony
> No can do, tab controls don't support background colours.
>
>> And what about changing the backcolour of all tabcontrols?
>> Thanks, really appreciate this
>> Tony
missinglinq - 22 Jul 2007 19:53 GMT
"2462-The section number you entered is invalid"
This is just a guess, but perhaps you have forms with the header height set
to zero?This might cause an error to be thrown when trying to set the
backcolor on a form section that, in reality, doesn’t exist.
As for changing the tabbed page colors, the prolific Stephen Lebans has a
workaround here:
http://www.lebans.com/tabcolors.htm

Signature
There's ALWAYS more than one way to skin a cat!
Answers/posts based on Access 2000
Tony Williams - 23 Jul 2007 09:23 GMT
Thanks I'll have a look at that
Tony
> "2462-The section number you entered is invalid"
>
[quoted text clipped - 7 lines]
>
> http://www.lebans.com/tabcolors.htm