Results 1 to 6 of 6
  1. #1
    Platinum Lounger
    Join Date
    Feb 2002
    Location
    A Magic Forest in Deepest, Darkest Kent
    Posts
    5,681
    Thanks
    0
    Thanked 1 Time in 1 Post

    Alternate records/Colour Change (97/2000)

    I have been playing around with this idea for some time now and can't quite get my head around it.

    I often see database applications that how a subform or a view of records with each record in the view in alternately different colours i.e. green, yellow,green, yellow etc Specifically in Tabular view. If I design a Tabular subform, I usually set the Fill/Back Color manually. Is there a way in code/or other. that can change the colour to yellow and then green and then yellow etc alternately for each view?

    Jerry
    Jerry

  2. #2
    Platinum Lounger
    Join Date
    Feb 2002
    Location
    A Magic Forest in Deepest, Darkest Kent
    Posts
    5,681
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Alternate records/Colour Change (97/2000)

    Hans

    Great. A little bedtime reading for me to get my head around your unknown sources thinking

    Jerry
    Jerry

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

    Re: Alternate records/Colour Change (97/2000)

    I have attached a database (zipped, Access 2000 format, but should work after converting in Access 97 too) that demonstrates various ways of highlighting rows in continuous forms, shamelessly copied from sources I have forgotten. Also, see <post#=288539>post 288539</post#>.
    Attached Files Attached Files

  4. #4
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts
    [quote name='HansV' post='382292' date='18-Jun-2004 07:30']I have attached a database (zipped, Access 2000 format, but should work after converting in Access 97 too) that demonstrates various ways of highlighting rows in continuous forms, shamelessly copied from sources I have forgotten. Also, see <post#=288539>post 288539</post#>.[/quote]
    This is a very clever database, it contains just what i want to do.

    How does it work?

    Would you be so kind as to explain how the various forms work with their coluring of rows.

    I think i understand how it works, but i dont know how the String function works. In some cases the number parameter is 40 in others 50, and always with lower case G.

  5. #5
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    The String function repeats a character a specified number of times. For example, String(10, "P") results in "PPPPPPPPPP".

    In the sample database, the text box txtBackground is formatted with the Webdings font; the "g" character in this font is a filled box character. font size has been set to 24 so that 40 or 50 box characters fill the entire text box.

    The Word document attached to Post 227297 explains how it works. It's for an earlier version of the sample database, so the details are a bit different, but the basic idea remains the same.

  6. #6
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts
    I know that you have specified 97/2000, but I thought I would mention that in 2007 this is now built-in.

    The properties of the Detail section have a Back Color and an Alternative Back Color.
    Regards
    John



Posting Permissions

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