Hi,
I keep getting an "item not found in collection error"! Can anyone please spot my mistake? I do have a textbox name "Building NO". When I step through, it seems that this line is causing the error. Thank you for any help.
I keep getting an "item not found in collection error"! Can anyone please spot my mistake? I do have a textbox name "Building NO". When I step through, it seems that this line is causing the error. Thank you for any help.
Code:
MyRecordset!Building_NO
Code:
Private Sub Form_Current()
Dim MyRecordset As DAO.Recordset
Set MyRecordset = Me.RecordsetClone
Dim i As Long, iCounter As Long
MyRecordset.MoveFirst
Do Until MyRecordset.EOF
If MyRecordset!Building_NO = Me.Building_NO Then iCounter = iCounter + 1
MyRecordset.MoveNext
Loop
MyBldLabel.Caption = "NO. Of Records for Bldg" & " " & Me.Building_NO.Value
Me.BldCount = iCounter
End Sub