I have a report with a form that supplies values for it to filter the fields in the report on, but also checkboxes to make the fields "disappear" if the user doesn't want them in the report. Problem is I can't get the mechanism to make them disappear work right. Here's the code I made:
Option Compare Database
Private Sub Report_Load()
Dim i As Integer, j As Integer, width As Integer
j = 23
For i = 1 To j
If "0 = Forms.CustomReportFilter.['Checkbox' & i]" Then
width = "0"
End If
Next i
Me.Controls("text" & i).width = width
End Sub
I'm getting an error 13, data type mismatch in the "0=Forms...." section. Does anyone know a better way to accomplish this or make this code work?
Option Compare Database
Private Sub Report_Load()
Dim i As Integer, j As Integer, width As Integer
j = 23
For i = 1 To j
If "0 = Forms.CustomReportFilter.['Checkbox' & i]" Then
width = "0"
End If
Next i
Me.Controls("text" & i).width = width
End Sub
I'm getting an error 13, data type mismatch in the "0=Forms...." section. Does anyone know a better way to accomplish this or make this code work?