Fredgarner
Technical User
I have entered the following code in order to move to a record in my subform based on a selection in a combo box. The subform is called 'Shareholders' and the field name it is looking up is 'Account Designation'.
Private Sub Combo176_AfterUpdate()
'Moves Record Selector to record in subform that corresponds to the 'selection in this combo box.
Dim varName As Integer
varName = Me.Combo176.Column(0)
With Me.Shareholders.Form
.RecordsetClone.FindFirst "Account Designation = " & varName
If Not .RecordsetClone.NoMatch Then
.Bookmark = .RecordsetClone.Bookmark
End If
End With
End Sub
When I try to carry out the action, it goes back to the code, with ".Shareholders" highlighted, and says "Method or data member not found".
Private Sub Combo176_AfterUpdate()
'Moves Record Selector to record in subform that corresponds to the 'selection in this combo box.
Dim varName As Integer
varName = Me.Combo176.Column(0)
With Me.Shareholders.Form
.RecordsetClone.FindFirst "Account Designation = " & varName
If Not .RecordsetClone.NoMatch Then
.Bookmark = .RecordsetClone.Bookmark
End If
End With
End Sub
When I try to carry out the action, it goes back to the code, with ".Shareholders" highlighted, and says "Method or data member not found".