Results 1 to 13 of 13

Thread: Rows and colors

  1. #1
    AlanCarter
    Guest

    Rows and colors

    I have an order form. I'd like to make every other row a different color. How? On a report it's easy: Me!Detail.Backcolor = vbYellow (or somesuch) Help!

  2. #2
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Rows and colors

    First of all, why? Second, you can't do this with a continuous form--reports are an entirely different animal. You only have one row worth of controls, so any formatting you apply applies to every record. Reports actually print one record at a time.
    Charlotte

  3. #3
    AlanCarter
    Guest

    Re: Rows and colors

    Why?!? There is a lot of information in each row, and I was looking for a way to make it more readable and to more accurately match the report that prints off of it (which has the multi colors. I realize that there is no way to do this "Built-in" I was just wondering if anyone knew of a work around. One thought that I had was to set a running count and to format the backs of the records based on the mod of the count (1 is odd, 0 is even, if 0 give a color). However I can't find an event to make it trigger. We've pretty much given up on the idea, but I've seen other (non-Access) programs with the feature and it would've been cool. O well.

  4. #4
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Rows and colors

    If you are displaying so many records on a form that it requires alternating colors, you have a form that needs redesigning. Forms and reports are NOT intended to serve the same purpose, and it is a bad idea to try and design forms to look like a report, no matter how much sense that makes to end users. Forms are primarily for entering and editing data, and they should be designed to facilitate that process. Reports are for outputting results and compilations and analyses.
    Charlotte

  5. #5
    AlanCarter
    Guest

    Re: Rows and colors

    err. . .

    I know reports and forms are not used to display the same info. This particular report is an invoice so it does help if it matches what is on the order.

    Also the product catalog could do with some sprucing up so I thought that might be the way to go, but if it can't be done it can't be done. No sweat, we'll just do something else.

    The amount of data is not too much per se, there are just many lines. I thought it might help to differentiate between the lines on the order and in the catalog. That said, I am dealing with restraints that have been placed upon me, and I am just trying to make the best out of a bad situation. I was just looking to see if someone knew how to help.

    Guess not. Sorry to waste your time.

  6. #6
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Newbury, Berkshire, England
    Posts
    712
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Rows and colors

    The following is an extract from an article on the

  7. #7
    DaveShmave
    Guest

    Re: Rows and colors

    Try this link: <A target="_blank" HREF=http://www.mvps.org/access/forms/frm0024.htm>http://www.mvps.org/access/forms/frm0024.htm</A>

    It apparently only works in Access 97, so if you're using 2000 you may need to tweak the code (or you're out of luck). This isn't quite what you're looking for as it's not designed to color every other row, but again maybe you can come up with a way to accommodate this.

    It seems to me I have seen code that does what you're asking for but I can't remember where I saw it. Of course I've seen this same thing for reports which works quite well but as Charlotte explained doing this on a continuous form is much more difficult if it's even possible.

    HTH

    Dave <img src=/S/nuts.gif border=0 width=15 height=15>

  8. #8
    AlanCarter
    Guest

    Re: Rows and colors

    Yes!!! This will work, i can use a webdings "g" all the way across and fake it!!! Thanks so much for all the help and the explanations. I'm still going to take a hard look at that form and see if maybe a redesign *is* called for. . . Thanks for all the help!

  9. #9
    4 Star Lounger SteveH's Avatar
    Join Date
    Jan 2001
    Location
    Chelsea, Gtr London, United Kingdom
    Posts
    587
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Rows and colors

    Here is a little demo db which does what you want, I think. The trick is to have a table (tblColours) with small coloured bitmaps to use as colour swatches in an unbound object frame on your form. You can use it for multi-coloured forms if you like! <img src=/S/cool.gif border=0 width=15 height=15>
    Attached Files Attached Files
    Steve H
    IT Lecturer/Access Developer
    O2K SR3/O2010; Win7Pro

  10. #10
    2 Star Lounger
    Join Date
    Jan 2001
    Location
    Indiana, USA
    Posts
    107
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Rows and colors

    I havn't been able to open any of these .mdb attachments. I have Office 97 SR-2 on Windows 95. I get the "Unrecognized database format." error.

  11. #11
    4 Star Lounger SteveH's Avatar
    Join Date
    Jan 2001
    Location
    Chelsea, Gtr London, United Kingdom
    Posts
    587
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Rows and colors

    Sorry I forgot the Access97 users out there! Here is the 97 version zip file for you.
    Attached Files Attached Files
    Steve H
    IT Lecturer/Access Developer
    O2K SR3/O2010; Win7Pro

  12. #12
    5 Star Lounger
    Join Date
    Feb 2001
    Location
    Louisville, Kentucky, USA
    Posts
    605
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Rows and colors

    I think this is what you are looking for....good luck.
    Attached Files Attached Files
    Roberta Price <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16>

  13. #13
    Star Lounger
    Join Date
    Jan 2001
    Location
    Yorkshire, England
    Posts
    82
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Rows and colors

    You don't say what version you use but the following sample works for 2000 using conditional formatting.
    The stripes go a bit screwy if you add records but for a browse form they work great
    Attached Files Attached Files

Posting Permissions

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