943,514 Members | Top Members by Rank

Ad:
Jan 6th, 2009
0

MSHFlex Grid Field get Highlighted if it is current date

Expand Post »
I am doing a project in VB and have used ADODC connection to connect in Access Database. I have used MSHFlexGrid and want it's data get highlighted Automatically if it is on current date (i.e Today's Date) for Birthday Reminder. How can i do it?
Last edited by Ravi Kant; Jan 6th, 2009 at 9:17 am.
Reputation Points: 11
Solved Threads: 1
Newbie Poster
Ravi Kant is offline Offline
13 posts
since Jan 2009
Jan 7th, 2009
0

Re: MSHFlex Grid Field get Highlighted if it is current date

Hi,

Once the Grid is Loaded, Loop thru the column and Highlight if matching, Say, you are Date Column is 2, Check this Code:

vb Syntax (Toggle Plain Text)
  1. Dim i As Integer
  2. For i = 1 To Grd.Rows-1
  3. If ISDate(Grd.TextMatrix(i,2)) Then
  4. If CDate(Grd.TextMatrix(i,2)) = Date Then
  5. Grd.Col = 2
  6. Grd.Row = i
  7. Grd.CellFontBold = True
  8. Grd.CellBackColor = vbBlue
  9. Grd.CellFontColor = vbWhite
  10. End If
  11. Next

Change Control Name accordingly..

Regards
Veena
Reputation Points: 84
Solved Threads: 140
Posting Shark
QVeen72 is offline Offline
923 posts
since Nov 2006

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Visual Basic 4 / 5 / 6 Forum Timeline: timer help
Next Thread in Visual Basic 4 / 5 / 6 Forum Timeline: FILL COMBO WITHOUT dupes...





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC