If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

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

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.

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