Computer Learning Zone CLZ Access Excel Word Windows

I think you learn more if you're laughing at the same time.

-Mary Ann Shaffer & Annie Barrows
 
Home   Courses   Index   Templates   Seminars   TechHelp   Forums   Help   Contact   Join   Order   Logon  
 
Home > Courses > Access > Seminars > Calendar > Calendar
Back to Calendar Seminar Lessons    Comments List
Miss Displaying Upload Images   Link   Email  
James Hopkins       
12 months ago
Hey Guys, I have created the Monthly Calendar like the one in the Calendar Seminar Lessons. But the Data is not displaying correctly. I get the Correct Day highlighted but no Data.

Here is the Code I'm using in Form:
DetailsPrivate Sub CalculateStartDate()

    'Set the First Day of the Month
    StartDate = DateSerial(Year(StartDate), Month(StartDate), 1)
    
    'Find the First SUNDAY
    While WeekDay(StartDate) <> 1
        StartDate = StartDate - 1
    Wend
    
End Sub

Public Sub OpenCalendar()

    Dim X As Integer
    Dim S1 As String, S2 As String
    
    Dim todayDay As Integer
    Dim todayMonth As Integer
    Dim todayYear As Integer
    
    todayDay = Day(Date)
    todayMonth = Month(Date)
    todayYear = Year(Date)
    
    CalculateStartDate
    Me.MonthName = Date
    
    For X = 1 To 42
        S1 = "Date" & X
        S2 = "Day" & X
        
        If (Day(Forms!MonthlyCalendarViewF(S1)) = todayDay And _
            Month(Forms!MonthlyCalendarViewF(S1)) = todayMonth And _
                Year(Forms!MonthlyCalendarViewF(S1)) = todayYear) Then
            Me(S2).BackColor = vbRed
        Else
            Me(S2).BackColor = &HFFFFFF
        End If
    Next X
    
End Sub

Here is the Code I'm using in each List Box:
SELECT ScheduleID, ScheduleStartTime, ScheduleStartDate, ScheduleDescription FROM ScheduleQ WHERE ScheduleStartDate>=Date()+1 AND ScheduleStartDate
Kevin Robertson            
12 months ago
Check to see that the number of days added to the Date() function are different in each List Box.
James Hopkins OP       
12 months ago
Kevin, there are. The Date and Time is stored in two different fields in the Table.
James Hopkins OP       
12 months ago
Hey, Changed the Code in List Boxes to:
SELECT ScheduleID, ScheduleStartTime, ScheduleStartDate, ScheduleDescription FROM ScheduleT WHERE ScheduleStartDate>=Date()+1 AND ScheduleStartDate

To see if the I can retrieve the Data for the Table to populate the Form. It worked but the Data is still displaying on the wrong Date or Day.

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Calendar Seminar Lessons.
 

 
 
 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
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
PCResale.NET
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
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

LinkedIn
Copyright 2024 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 11/6/2024 5:11:42 PM. PLT: 0s