Hey Guys, I am try use the same methods used in the "Calendar Seminar". But I am not wanting to use an "Date Picker Form" the select the Date for the Calendar. Wanting to open the "Monthly Calendar Form" and see the current Month's Data, than filter the Data to see Next Months, Last Months, and etc. What the best way do this correctly?
James HopkinsOP 13 months ago
James HopkinsOP 13 months ago
James HopkinsOP 13 months ago
Kevin Robertson 13 months ago
Instead of X it should be Day(Calendar(S1)) = todayDay
James HopkinsOP 13 months ago
So Kevin, replace "X" with "Day" where "X" is at.
Public Sub OpenCalendar()
Dim day As Integer
Dim S1 As String, S2 As String
Dim todayDay As Integer
Dim todayMonth As Integer
Dim todayYear As Integer
For day = 1 To 42
S1 = "Date" & day
S2 = "Day" & day
If (day(Calendar(S1)) = todayDay And _
Month(Calendar(S1)) = todayMonth And _
Year(Calendar(S1)) = todayYear) Then
Me(S2).BackColor = vbRed
Else
Me(S2).BackColor = &HFFFFFF
End If
Next X
End Sub
James HopkinsOP 13 months ago
I get an ERROR Message:
James HopkinsOP 13 months ago
James HopkinsOP 13 months ago
James HopkinsOP 13 months ago
Kevin Robertson 13 months ago
According to your previous images Calendar is the name of a Text Box. This should be the name of the Form.
Something like this:
Forms!FormName (S1)
James HopkinsOP 13 months ago
Yes Kevin, the "Calendar" is a Text Box on the Monthly Calendar Form, along with the "Start Date" Text Box.
James HopkinsOP 13 months ago
Thank Kevin, I get it now. You was correct. How I got to get the Data to Populate the List Boxes, now.
SELECT ScheduleID, ScheduleStartTime, ScheduleDescription FROM ScheduleQ WHERE ScheduleStartDate>=Date() AND ScheduleStartDate<Date()+1 ORDER BY ScheduleStartTime;
James HopkinsOP 13 months ago
Hey Guys, I get the Data to Display but it is showing up on the wrong Date.
James HopkinsOP 13 months ago
James HopkinsOP 13 months ago
Kevin Robertson 13 months ago
Is the SQL correct in the Row Source of each of the List Boxes?
James HopkinsOP 13 months ago
Yes, here's what the SQL in the List Box:
SELECT ScheduleID, ScheduleStartTime, ScheduleStartDate, ScheduleDescription FROM ScheduleQ WHERE ScheduleStartDate>=Date() AND ScheduleStartDate<Date()+1 ORDER BY ScheduleStartTime;
James HopkinsOP 13 months ago
The Date and Time is stored in two separate fields in the Table.
Sorry, only students may add comments.
Click here for more
information on how you can set up an account.
If you are a Visitor, go ahead and post your reply as a
new comment, and we'll move it here for you
once it's approved. Be sure to use the same name and email address.
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.