MSHFlex Grid Field get Highlighted if it is current date

Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Jan 2009
Posts: 13
Reputation: Ravi Kant is an unknown quantity at this point 
Solved Threads: 1
Ravi Kant's Avatar
Ravi Kant Ravi Kant is offline Offline
Newbie Poster

MSHFlex Grid Field get Highlighted if it is current date

 
0
  #1
Jan 6th, 2009
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.
Reply With Quote Quick reply to this message  
Join Date: Nov 2006
Posts: 848
Reputation: QVeen72 is on a distinguished road 
Solved Threads: 120
QVeen72's Avatar
QVeen72 QVeen72 is offline Offline
Practically a Posting Shark

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

 
0
  #2
Jan 7th, 2009
Hi,

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

  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
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the Visual Basic 4 / 5 / 6 Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC