(See thread703-1039756 for the beginning of this discussion!)
Here's the code as I entered it:
Private Sub Report_Open(Cancel As Integer)
'ColWD27 - ColWD30 & ColDate27 - ColDate30 should be for dates at the
' beginning of the month. If not, they are from
' the previous month and we want them to be invisble
Dim intCol As Integer
For intCol = 27 To 30
If Day(Me("ColWD" & intCol)) > 3 Then
Me("ColWD" & intCol).Visible = False
Me("ColDate" & intCol).Visible = False
Me("D" & intCol).Visible = False
End If
Next
End Sub
When I try to run it I get an error that I have entered an expression that has no value (it's run-time error # 2427)
When I click on Debug - the line of code that is highlighted is
If Day(Me("ColWD" & intCol)) > 3 Then
The report Page Header contains 2 rows of text boxes to hold the date data:
ColWD (1-30) are for displaying the weekdays as Mon, Tue, etc; ColDate (1-30) are for displaying the dates in the format of 4/15, 4/16, etc. This formatting is set in the text box properties directly.
The text boxes are all located in the Page Header right now; nothing in the Details section yet.
Here's the code as I entered it:
Private Sub Report_Open(Cancel As Integer)
'ColWD27 - ColWD30 & ColDate27 - ColDate30 should be for dates at the
' beginning of the month. If not, they are from
' the previous month and we want them to be invisble
Dim intCol As Integer
For intCol = 27 To 30
If Day(Me("ColWD" & intCol)) > 3 Then
Me("ColWD" & intCol).Visible = False
Me("ColDate" & intCol).Visible = False
Me("D" & intCol).Visible = False
End If
Next
End Sub
When I try to run it I get an error that I have entered an expression that has no value (it's run-time error # 2427)
When I click on Debug - the line of code that is highlighted is
If Day(Me("ColWD" & intCol)) > 3 Then
The report Page Header contains 2 rows of text boxes to hold the date data:
ColWD (1-30) are for displaying the weekdays as Mon, Tue, etc; ColDate (1-30) are for displaying the dates in the format of 4/15, 4/16, etc. This formatting is set in the text box properties directly.
The text boxes are all located in the Page Header right now; nothing in the Details section yet.