MSFlexGrid Row Colour


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 4 of 4

Thread: MSFlexGrid Row Colour

  1. #1
    Chris Zammit Guest

    MSFlexGrid Row Colour


    Hi All

    Iím using an MSFlexGrid with a SQL RecordSource to display information from
    an MSAccess Database.

    Is it possible to highlight rows(change back colour)in the MSFlexGrid that
    meet a condition?

    I'd be grateful if anyone could help

    Chris Zammit


  2. #2
    Josko Vukasovic Guest

    Re: MSFlexGrid Row Colour


    "Chris Zammit" <czammit@htec.co.uk> wrote:
    >
    >Hi All
    >
    >Iím using an MSFlexGrid with a SQL RecordSource to display information from
    >an MSAccess Database.
    >
    >Is it possible to highlight rows(change back colour)in the MSFlexGrid that
    >meet a condition?
    >
    >I'd be grateful if anyone could help
    >
    >Chris Zammit
    >


    Chris, you can do something like this:

    With MSFlexGrid
    .Row = 4 ' the row you want to highlight
    For i = 0 To .Cols - 1
    .Col = i
    .CellBackColor = QBColor(14)
    Next i
    End With

    Hope this helps. Josko




  3. #3
    Join Date
    Jan 2009
    Location
    Canada
    Posts
    14
    hi i have the same problem, however i want to highlight duplicate rows. i'm using ms access and vb6 what i want is when the user click the save button the program will search first for the duplicate error in msflexgrid and database and if there are duplicate records then the duplicated row will change background color to identify it.

  4. #4
    Join Date
    Apr 2007
    Location
    Sterling Heights, Michigan
    Posts
    8,666
    Quote Originally Posted by enigmagirl122 View Post
    what i want is when the user click the save button the program will search first for the duplicate error in msflexgrid and database and if there are duplicate records
    Wouldn't it be less good, and make more sense, to simply not save the record at all into either the database or the grid. If you identify a new record as a duplicate, just pop up a message box telling the user that, and that it won't be saved.
    I don't answer coding questions via PM or Email. Please post a thread in the appropriate forum section.
    Please use [Code]your code goes in here[/Code] tags when posting code.
    Before posting your question, did you look here?
    Got a question on Linux? Visit our Linux sister site.
    Modifications Required For VB6 Apps To Work On Vista

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center