I set up a complicated form last year for annual retreat we do at our company and it worked fantastic last year. This year, we are doing the retreat again, but for some reason, now the code behind the form quit working. I checked the code and seems like the references are missing. I’m posting the code and hopefully, someone can help me figure out what reference is missing.
The Error message:
“Run Time Error 91
Object Variable or With block variable not set”
The coding:
Private Sub cboCabin_AfterUpdate()
‘ Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst “[CabinID] = ” & Str(Me![cboCabin])
Me.Bookmark = rs.Bookmark
Forms!frmHousingMatchup!fsubRoom!cboRoom.RowSource = “SELECT [tblroom].[RoomID], [tblroom].[Room]” & “FROM [tblroom]WHERE [CabinID] = ” & Me!CabinID
Forms!frmHousingMatchup!fsubRoom!cboRoom.Requery
End Sub
=====================================
Set rs = Me.Recordset.Clone line is highlighted in yellow.