I am trying to update a form after I change the value of a combo box. I have tried the code listed in the FAQs (faq702-3765), but I am getting a 2105 run-time error on one line.
I highligted where the error is occuring.
I highligted where the error is occuring.
Code:
Private Sub Office_Number_AfterUpdate()
Dim rs As Recordset
Dim strOffice As String
Set rs = Me.RecordsetClone
strOffice = "[Office Number]='" & [Office Number].Column(0) & "'"
rs.FindFirst (strOffice)
If rs.NoMatch Then
MsgBox "The selected record cannot be displayed because it is filtered out. " _
& "To display this record, you must first turn off record filtering.", _
vbInformation
Else
[b][red]Me.Bookmark = rs.Bookmark[/red][/b]
End If
Set rs = Nothing
End Sub