[AccessD] Grrr VBA is fighting me!

Charlotte Foust charlotte.foust at gmail.com
Thu Dec 5 17:47:39 CST 2013


That's what I finally wound up doing, but wouldn't you expect there to be a
more direct route by this time?  A height of zero doesn't actually mean the
section doesn't exist, just that it's been minimized.

Charlotte


On Thu, Dec 5, 2013 at 3:26 PM, Dan Waters <df.waters at comcast.net> wrote:

> Hi Charlotte,
>
> Can you check to see if the header height is > 0?
>
> Dan
>
> -----Original Message-----
> From: accessd-bounces at databaseadvisors.com
> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Charlotte Foust
> Sent: Thursday, December 05, 2013 4:56 PM
> To: Access Developers discussion and problem solving
> Subject: [AccessD] Grrr VBA is fighting me!
>
> I'm not doing anything really exotic, just trying to set the form header
> backcolor to a specific color if the section exists.  Here's some code I
> tried that compiles.  Intellisense recognizes the constants, but when the
> statement runs, I get an error 2462 message, "The Second number you entered
> is invalid."   Did someone change the section numbers between versions
> without documenting it anywhere?  The line that actually sets the backcolor
> works if there is a form header, but I can't figure out a way to test for
> whether the form has a header!  If it doesn't and I try to set the color, I
> get  a 2465 error, "Application-defined or Object-defined error."  I'm
> getting headache ...
>
>     If frm.Section(acHeader).Visible = True Then
>         frm.FormHeader.BackColor = 12566463 '#BFBFBF - darker gray
>     End If
>
> Charlotte
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>


More information about the AccessD mailing list