In my db I an tracking different types of seed and the process from harvesting the seed, through all the stages of drying and so on all the way to being bagged and sold. I'm not tracking the sale other than it was sold. On my Events Form I have a subform on it. On the form portion I have a combo box that looks up the LOT ID for each seed. When a LOTID is chosen the subform populates with the events/stages that that seed has gone through. That portion works fine. Since the users don't always know the LOTID they would like to search by the PRODUCT (which is the seed name) then see the LOTID's that are available for that PRODUCT. It's basically a cascading combo box. This portion is working correctly. However after I have chosen my product then chosen the LOTID from the list of available LOTID's I want that to function just like my other lookup where I choose the LOTID and the events subform populates. So I copied the code from the LOTID LOOKUP to the same place on my cboLOTS. When I run my cascading combo I can choose the PRODUCT from there I get my list of available LOTID's and when I choose a LOTID I get the error "Run-Time error '13': Type mismatch"
My code is
Private Sub cboLots_AfterUpdate()
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[ADSID] = " & Str(Me![cboLots])
Me.Bookmark = rs.Bookmark
End Sub
The ADSID is an ID for each event/stage. I guess I don't know why this exact same code
Private Sub cboLotIDLU_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[ADSID] = " & Str(Me![cboLotIDLU])
Me.Bookmark = rs.Bookmark
End Sub
will work when I'm choosing the LOTID directly but not when I use the cascading lookup?
Any suggestions,
Rick
My code is
Private Sub cboLots_AfterUpdate()
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[ADSID] = " & Str(Me![cboLots])
Me.Bookmark = rs.Bookmark
End Sub
The ADSID is an ID for each event/stage. I guess I don't know why this exact same code
Private Sub cboLotIDLU_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[ADSID] = " & Str(Me![cboLotIDLU])
Me.Bookmark = rs.Bookmark
End Sub
will work when I'm choosing the LOTID directly but not when I use the cascading lookup?
Any suggestions,
Rick