[AccessD] Grrr VBA is fighting me!

Charlotte Foust charlotte.foust at gmail.com
Thu Dec 5 16:56:19 CST 2013


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


More information about the AccessD mailing list