I have a form called frmpolines that is used as a subform inside a form called frmPoheader. This subform has a combo box control (cboItemNo) that will populate some text boxes when a user selects from the combo box. I used the wizard to create the code in the combo box - see below. When I open the subform (frmpolines) by itself it works fine. I'm able to select an item from the combo box and the appropriate text boxes get populated. However, when I open the main form (frmPoheader) and I select from the combobox(cboitemNo) in the subform I get the runtime-error 3021. I can't figure out why I get that. Any help would be greatly appreciated.
Private Sub cboItemNo_AfterUpdate()
Dim rs As Object
Set rs = Me.RecordsetClone
rs.findfirst "[ItemNo] = '" & Me![cboItemNo] & "'"
--->Me.Bookmark = rs.Bookmark <----'highlighted in debug
If Not IsNull([ItemNo]) Then
Call get_pic([cboItemNo], Image1)
End If
Call configsizes
End Sub
Private Sub cboItemNo_AfterUpdate()
Dim rs As Object
Set rs = Me.RecordsetClone
rs.findfirst "[ItemNo] = '" & Me![cboItemNo] & "'"
--->Me.Bookmark = rs.Bookmark <----'highlighted in debug
If Not IsNull([ItemNo]) Then
Call get_pic([cboItemNo], Image1)
End If
Call configsizes
End Sub