E
Eric
I have a section of code that no matter what I do it is
formatting the dates back in the 1890's. This is not when
I need the dates set to please take a look at this section
of code that was sent to me by another more experienced
user and see if you all have any ideas.
Private Sub Form_Load()
Dim dtStart As Date
Dim iDowStart As Integer
Dim dtKt As Date
Dim iBox As Integer
dtStart = July - 2003
iDowStart = Weekday(dtStart)
For dtKt = dtStart To DateAdd("m", 1, dtStart) - 1
iBox = (Day(dtKt) + iDowStart - 2) Mod 35
Me("dt" & iBox) = dtKt
If iBox < 6 Or iBox > 27 Then
Me("sub" & iBox).Visible = True
End If
Next
Me.Caption = Format(dtStart, "mmmm yyyy")
End Sub
Thanks for your help.
formatting the dates back in the 1890's. This is not when
I need the dates set to please take a look at this section
of code that was sent to me by another more experienced
user and see if you all have any ideas.
Private Sub Form_Load()
Dim dtStart As Date
Dim iDowStart As Integer
Dim dtKt As Date
Dim iBox As Integer
dtStart = July - 2003
iDowStart = Weekday(dtStart)
For dtKt = dtStart To DateAdd("m", 1, dtStart) - 1
iBox = (Day(dtKt) + iDowStart - 2) Mod 35
Me("dt" & iBox) = dtKt
If iBox < 6 Or iBox > 27 Then
Me("sub" & iBox).Visible = True
End If
Next
Me.Caption = Format(dtStart, "mmmm yyyy")
End Sub
Thanks for your help.