Results 1 to 4 of 4
  1. #1
    Star Lounger
    Join Date
    Jun 2001
    Location
    Bethlehem, Pennsylvania, USA
    Posts
    67
    Thanks
    0
    Thanked 0 Times in 0 Posts

    datasheet view formatting (Access XP)

    I have a form that has a table shown in a datasheet view. For ease of readability, is there a way to make the background different for alternating record (i.e. all odd records background = yellow, all even records background = gray)?

    Thanks in advance

  2. #2
    4 Star Lounger
    Join Date
    Feb 2001
    Location
    Richland, Washington, USA
    Posts
    407
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: datasheet view formatting (Access XP)

    Dave,

    I've wrestled with this from time to time and never found a satisfactory solution. It's relatively easy to do for reports, but not for forms (as far as I can tell). A possible kludge (just occured to me, I haven't actually tried it) is to create an image (bmp, gif, jpg, etc.) that shows the row-by-shading you want. Import this as the background for your form and then align your fields (and give them a transparent background) with the image. You may have to play around with the positioning, sizing, etc. to get this to work satisfactorily.

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

    Re: datasheet view formatting (Access XP)

    Although this can be done in a datasheet form, it is a lot of work. You could use conditional formatting for all controls, using an expression that evaluates to true for even-numbered records, and false for odd-numbered records. There are some tricks for creating alternating background colors in a continuous form; see for example "Highlight a Single Row" on Mark Liquorman's Access Tips, Links, & Downloads page.

  4. #4
    4 Star Lounger
    Join Date
    Feb 2001
    Location
    Richland, Washington, USA
    Posts
    407
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: datasheet view formatting (Access XP)

    Oops... When I wrote my response above, I was thinking "continuous" when you said "datasheet". If you're willing to "simulate" a datasheet form using a continuous form, then my suggestion may work for you. Otherwise, in the immortal words of Emily Lattela, never mind!

Posting Permissions

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