RSS Forums RSS

MSHFlex Grid Field get Highlighted if it is current date

Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums
Reply
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

  #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 8:17 am.
AddThis Social Bookmark Button
Reply With Quote  
Posts: 848
Reputation: QVeen72 is on a distinguished road 
Solved Threads: 119
QVeen72's Avatar
QVeen72 QVeen72 is offline Offline
Practically a Posting Shark

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

  #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  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.



Other Threads in the Visual Basic 4 / 5 / 6 Forum
Views: 367 | Replies: 1 | Currently Viewing: 1 (0 members and 1 guests)

 

Thread Tools Display Modes
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 10:41 pm.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC