[AccessD] Grrr VBA is fighting me!

Dan Waters df.waters at comcast.net
Thu Dec 5 17:26:59 CST 2013


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



More information about the AccessD mailing list