I am using the following code within a function to find a listbox count. It is called from a button on the frmReportSelection. It is not important what the surrounding code looks like, but it fails when it tries to find my form. The form name is frmReportSelection and it is a sub form of frmSCD. It always fails at the second line of code. Any suggestions?
Code:
Dim ListControl As Control
Set ListControl = Forms!frmSCD!frmReportSelection!PickCGCRCounties
With ListControl
If .ListCount < 10 Then
.ListRows = .ListCount
Else
.ListRows = 10
End If
End With