Results 1 to 3 of 3
  1. #1
    New Lounger
    Join Date
    Mar 2004
    Location
    Worcestershire, England
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Display a header in a form created withCreateForm (2000 SR1)

    I think this should be possible, but I can't get it to work. I am creating a form on the fly, and I want to put controls in the form header - but whenever I try to set properties of the form header I get an error saying the "section number you entered is invalid". This is what I've tried:

    Dim frmNew as Form
    Set frmNew = CreateForm()

    'the next 3 lines are some of the variations I've tried
    frmNew.Section(acHeader).Height=500
    frmNew.Section(1).Height=500
    frmNew.Section(1).Visible=True

    I get the same error if I use CreateControl to try and put a control in the header section. Everything works OK when I add controls to the detail section.

    Any ideas, please?

    Many thanks, Ruth

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Display a header in a form created withCreateForm (2000 SR1)

    When you create a form this way, it doesn't have a header/footer. Create them by inserting

    RunCommand acCmdFormHdrFtr

    below

    Set frmNew = CreateForm

  3. #3
    New Lounger
    Join Date
    Mar 2004
    Location
    Worcestershire, England
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Display a header in a form created withCreateForm (2000 SR1)

    Many thanks HansV - I'm on my way again.

    Ruth

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •