Access 2007-2019
Access 2000-2003
Access Seminars
TechHelp Support
Tips & Tricks
Access Forum
Course Index
Topic Glossary
Insider Circle
 
Home   Courses   Seminars   Templates   Help   TechHelp   Forums   Contact   Join   Order   Logon  
 
Tips & Tricks

New Tips Added Weekly!
Click here to get on our Mailing List

   
 
MS Access

Calendar Seminar Addendum - Highlight Current Day

Highlight the current day on the main Form

In this tutorial I will explain how to highlight the current day of the current month.

The original code for changing none current month days is in the Form_DatePickerF so this would be a good place to start.

We need to compare the Current Day, Month and Year against the Day, Month and Year of the Date on the Form.

You are welcome to change the colour for vbRed too

Form_DatePickerF

	Public Sub OpenCalendar()
		
		...
		
		'Dim today As Date
		'today = Date
		Dim todayDay As Integer
		todayDay = Day(Date)
		Dim todayMonth As Integer
		todayMonth = Month(Date)
       Dim todayYear As Integer
       todayYear = Year(Date)
		
		...
		
		For X = 1 To 42
		
		...
		
			If (X = todayDay And _
				Month(Forms!MonthlyCalendarF(S1)) = todayMonth And _
					Year(Forms!MonthlyCalendarF(S1)) = todayYear) Then
				Forms!MonthlyCalendarF(S2).BackColor = vbRed
			Else
				Forms!MonthlyCalendarF(S2).BackColor = &HFFFFFF
			End If
		
		...
		
		Next X
		
	End Sub
	

MonthlyCalendarF - Highlight Current Day


Have you watched the Addendums?


 

Alex Hedley (Avatar) By: Alex Hedley


Click here to sign up for more FREE tips

 

You may want to read these articles from the 599CD News:

 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Account Login
Online Theater
Downloads
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Email Richard
Mailing Address
Phone Number
Fax Number
Course Survey
Blog RSS Feed    Twitter

YouTube Channel    LinkedIn