Page 1 of 2 12 LastLast
Results 1 to 15 of 20
  1. #1
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Background of Group Footer controls (Access2002)

    I have a report where records are supplied as RaceNo, Horse, text, QuestionNo and Shade.
    I need to build th report with the Horse in the headings (this works fine) and the questions down the left side of the page (this is fine too).
    I build up the text into variables labelled tab1 - tab10 in a Group Footer based upon QuestionNo, this is done in the detail section, this works fine too.

    What I wish to do is to change the background colour to yellow of the tab1 - tab10 controls if the Shade is True.
    Sometimes it sets the correct controls background to yellow, whereas in other it does not set it at all.

    Any ideas.

  2. #2
    Star Lounger
    Join Date
    Sep 2003
    Location
    Ocean Gate, New Jersey, USA
    Posts
    55
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Background of Group Footer controls (Access2002)

    Hello Pat,

    I am not sure if this what your looking for but it has some good references.
    http://www.rogersaccesslibrary.com/downloa...rmatting2k.mdb'

    (Edited by HansV to make URL clickable - see <!help=19>Help 19<!/help>)

  3. #3
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: Background of Group Footer controls (Access2002)

    Thanks for the link, but from what I could see, it was about mucking around with controls on forms. I have a report problem here, and am trying to work out why when I set a controls background to vbYellow and then it seems to execute the format event a second time (with FormatCount=1 both times) that it then sets it to vbWhite.

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

    Re: Background of Group Footer controls (Access2002)

    Do you have the code to set the background color in the On Format event of the group footer that contains Tab1 - Tab10 or in the On Format event of the detail section?

  5. #5
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: Background of Group Footer controls (Access2002)

    I have tried both, the code is currently in the Group Footer format section.

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

    Re: Background of Group Footer controls (Access2002)

    Perhaps you could post a stripped down version? <img src=/S/evilgrin.gif border=0 alt=evilgrin width=15 height=15>
    <UL><LI>Make a copy of the database and work with that.
    <LI>Remove all database objects (tables, queries, forms, reports, macros and modules) that are not relevant to the problem.
    <LI>In the remaining table(s), remove most records - leave only the minimum number necessary to demonstrate the problem.
    <LI>Remove or modify data of a confidential nature.
    <LI>Do a compact and repair (Tools/Database Utilities).
    <LI>Make a zip file containing the database; it should be below 100KB.
    <LI>Attach the zip file to a reply.[/list]That would enable us to investigate...

  7. #7
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: Background of Group Footer controls (Access2002)

    I have compacted my database and it has been zipped down to 944k, is it ok if I email it to you.
    If that's ok with you, you will notice in my tbl SupaDupa that the field Shade is checked where I want to show the background in yellow.
    The report shows the questions down the side and the horses across the top.

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

    Re: Background of Group Footer controls (Access2002)

    You need only include the bits that are essential to this problem. I can't believe that you would need a zip file of 944 KB for that.

  9. #9
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: Background of Group Footer controls (Access2002)

    There are the following objects:

    There are 6 tables where:
    table 1 - 1 record
    table 2 - 5 records
    table 3 - 9 records
    table 4 - 134 records
    table 5 - 119 records
    table 6 - 17 records

    There are 3 queries.

    There is 1 report and 1 subreport.

    How do I get it down any further, as I say I have already compacted it.

    Thanks

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

    Re: Background of Group Footer controls (Access2002)

    I don't want to let you spend too much time on trying to get the zip file smaller. Perhaps you could post the code behind the report and/or subreport instead? If it is long, put it in a text file and attach it - that surely won't be over 100 KB, I hope.

    (Zipping usually compresses an Access database by about 80%, sometimes a bit less, often more, so a 100 KB zip file corresponds to a database of about 500 KB. Since we don't need to see everything, that should be sufficient to demonstrate the problem. I don't think we need 134 and 119 records in table 4 and table 5, respectively - a few should be enough. And have you tried importing the objects into a new database?)

  11. #11
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: Background of Group Footer controls (Access2002)

    Importing into a new database reduced the database size from 3.3Mb to 600k. I have zipped it to 97k, so here it is.
    Attached Files Attached Files

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

    Re: Background of Group Footer controls (Access2002)

    LOL,

    Just after I logged out, the explanation suddenly dawned on me.

    Your code works OK (although it could be made more efficient), but most of the Tab1 .. Tab10 text boxes had their background style set to transparent! If you set it to normal, the yellow will show up. <img src=/S/rofl.gif border=0 alt=rofl width=15 height=15>

  13. #13
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: Background of Group Footer controls (Access2002)

    Hans,

    You're going LOL, what should I be doing ?

    How could I make it more efficient?

    Thanks Hans

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

    Re: Background of Group Footer controls (Access2002)

    It is too late now to go into details, have to go to bed.

    Select Tab1 to Tab10 and set Background Style to Normal. This is sufficient to make the code work. Making it more efficient is not essential, but I'll get back to you (much) later.

    G'night for now...

  15. #15
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: Background of Group Footer controls (Access2002)

    Thanks mate, sleep well.

Page 1 of 2 12 LastLast

Posting Permissions

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