Results 1 to 15 of 15
  1. #1
    Star Lounger
    Join Date
    Mar 2007
    Location
    Dexter, USA
    Posts
    90
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I have a subform on my report that does not apply to all customers. How do I make it invisible and remove the space allowed for it, if it does not apply?

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    [quote name='Theresa01' post='765805' date='17-Mar-2009 16:22']I have a subform on my report that does not apply to all customers. How do I make it invisible and remove the space allowed for it, if it does not apply?[/quote]
    Set the Can Shrink property of the subreport control on the main report to Yes, and do the same for the section that contains the subreport.

  3. #3
    Star Lounger
    Join Date
    Mar 2007
    Location
    Dexter, USA
    Posts
    90
    Thanks
    0
    Thanked 0 Times in 0 Posts
    The subform is in the footer section (QuoteGroupName footer). The properties for the footer and subform are set at Can Grow and Can Shrink. Is there anything else that I should check?

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    [quote name='Theresa01' post='765833' date='17-Mar-2009 17:32']The subform is in the footer section (QuoteGroupName footer). The properties for the footer and subform are set at Can Grow and Can Shrink. Is there anything else that I should check?[/quote]
    Make sure that Can Shrink has been set to Yes for both the group footer section and the subreport.
    There shouldn't be other controls that overlap horizontally with the subreport control; for example, there shouldn't be a label next to the subreport.

  5. #5
    Star Lounger
    Join Date
    Mar 2007
    Location
    Dexter, USA
    Posts
    90
    Thanks
    0
    Thanked 0 Times in 0 Posts
    [quote name='HansV' post='765837' date='17-Mar-2009 17:38']Make sure that Can Shrink has been set to Yes for both the group footer section and the subreport.
    There shouldn't be other controls that overlap horizontally with the subreport control; for example, there shouldn't be a label next to the subreport.[/quote]


    I've checked and from what you've indicated this should be working fine. I took my access class a few years ago and I recall the instructor cautioning us that if when someone (in my case the IT dept) installs the software, they need to make sure that the old version of access is completely wiped away. Could that be the case here? I don't remember how to check that but could that create a problem with something like this? I have unbound images on the report that randomly appear and disappear when pushing it to an Adobe PDF. My coworker has to do all of the printing because I never know if the logo's are going to "stick" or not!

    Horizonally, the subform goes from margin to margin with nothing next to it at all. There are several subforms both above and below it.

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    [quote name='Theresa01' post='765849' date='17-Mar-2009 18:31']... they need to make sure that the old version of access is completely wiped away. Could that be the case here? I don't remember how to check that but could that create a problem with something like this?[/quote]
    I don't think that would cause problems with Can Shrink.

    Could you post a stripped down copy of your database? See post 401925 for instructions.

  7. #7
    Star Lounger
    Join Date
    Mar 2007
    Location
    Dexter, USA
    Posts
    90
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I don't know if my last attachment worked.

    I'll try this again. Would you mind checking the properties on the logo's for me because they only go over to the PDF on occassion. Sometimes they are there and sometimes they aren't...

    Thanks
    Attached Files Attached Files

  8. #8
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    The subforms aren't really empty - they do display a single record, but the field in some of the subform happens to be blank.

    I don't see the need for all those subforms. You can include the fields in the record source of the main report.
    Since you want labels with the text boxes, you need a little bit of code.
    See the attached version: [attachment=82940:db1.zip]

    I have no idea why the logos wouldn't appear in a PDF file.
    Attached Files Attached Files

  9. #9
    Star Lounger
    Join Date
    Mar 2007
    Location
    Dexter, USA
    Posts
    90
    Thanks
    0
    Thanked 0 Times in 0 Posts
    [quote name='HansV' post='765902' date='17-Mar-2009 21:10']The subforms aren't really empty - they do display a single record, but the field in some of the subform happens to be blank.

    I don't see the need for all those subforms. You can include the fields in the record source of the main report.
    Since you want labels with the text boxes, you need a little bit of code.
    See the attached version: [attachment=82940:db1.zip]

    I have no idea why the logos wouldn't appear in a PDF file.[/quote]


    Thank you for the reply. I wasn't able to work on this last week. Sorry for the late reply. I hope you get this because I'm not quite sure how this new format works and have not been able to get the email reply to work myself.

    I had to add an additional freight term and I'm afraid I must be missing some of the code. I clicked on QuoteGroupName footer, went into the module and pasted what you had on the sample database. Added the additional term that I needed (QtyDiscount) and I'm stuck.

    This highlights in yellow:
    Private Sub GroupFooter0_Format(Cancel As Integer, FormatCount As Integer)

    This is what I tried to add:
    Me.QtyDiscount.Visible = Not IsNull(Me.QtyDiscount)

    Is there code somewhere else that I missed? I noticed that your module had (General) and (Declarations) at the top.
    I've tried to adjust it to that but it keeps reverting back to GroupFooter(0) and Format.

  10. #10
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    Have you added a control named QtyDiscount to the group footer? If there is a control bound to QtyDiscount but whose name is different (for example Text37), the code will fail - the code uses the Name property of the control.

    And is the name of your group footer GroupFooter0? If it has a different name, you should use that instead of GroupFooter0.

  11. #11
    Star Lounger
    Join Date
    Mar 2007
    Location
    Dexter, USA
    Posts
    90
    Thanks
    0
    Thanked 0 Times in 0 Posts
    [quote name='HansV' post='767013' date='24-Mar-2009 14:05']Have you added a control named QtyDiscount to the group footer? If there is a control bound to QtyDiscount but whose name is different (for example Text37), the code will fail - the code uses the Name property of the control.

    And is the name of your group footer GroupFooter0? If it has a different name, you should use that instead of GroupFooter0.[/quote]


    My GroupFooter had a different name and I don't get an error on QtyDiscount any longer BUT the fields and space allowed for the field don't disappear when they are left blank. This is so frustrating. I think I have everything set as Can Grow/Can Shrink but I'm definitely missing something!

    (I had to put each term on a seperate table so they could track when the terms change and I didn't know how to do that without breaking them out.)

    I'm attaching a new database. Any assistance you can offer will be appreciated.

    Thanks,
    Theresa
    Attached Files Attached Files

  12. #12
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    The name of the group footer *is* GroupFooter0 as you can see by selecting it and looking at the Other tab of the Properties window. So you should use

    Private Sub GroupFooter0_Format(Cancel As Integer, FormatCount As Integer)

    instead of

    Private Sub QuoteGroupNameFooter_Format(Cancel As Integer, FormatCount As Integer)

  13. #13
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Sint Niklaas, Belgium
    Posts
    2,778
    Thanks
    0
    Thanked 0 Times in 0 Posts
    [quote name='Theresa01' post='767601' date='26-Mar-2009 16:43']My GroupFooter had a different name and I don't get an error on QtyDiscount any longer BUT the fields and space allowed for the field don't disappear when they are left blank. This is so frustrating. I think I have everything set as Can Grow/Can Shrink but I'm definitely missing something![/quote]
    In addition of Hans' answer, you should have [Event Procedure] in the On Format event of GoupFooter0. See attachment
    [attachment=83085:OnFormat.jpg]
    Attached Images Attached Images
    Francois

  14. #14
    Star Lounger
    Join Date
    Mar 2007
    Location
    Dexter, USA
    Posts
    90
    Thanks
    0
    Thanked 0 Times in 0 Posts
    [quote name='Francois' post='767611' date='26-Mar-2009 17:06']In addition of Hans' answer, you should have [Event Procedure] in the On Format event of GoupFooter0. See attachment
    [attachment=83085:OnFormat.jpg][/quote]


    THANK YOU!!! I was trying to compare the differences but missed that one!

  15. #15
    Star Lounger
    Join Date
    Mar 2007
    Location
    Dexter, USA
    Posts
    90
    Thanks
    0
    Thanked 0 Times in 0 Posts
    [quote name='HansV' post='767605' date='26-Mar-2009 16:58']The name of the group footer *is* GroupFooter0 as you can see by selecting it and looking at the Other tab of the Properties window. So you should use

    Private Sub GroupFooter0_Format(Cancel As Integer, FormatCount As Integer)

    instead of

    Private Sub QuoteGroupNameFooter_Format(Cancel As Integer, FormatCount As Integer)[/quote]


    Thank you. It's working as expected now!

Posting Permissions

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