I'm using the following code with a listbox and the Cool search tool. The search is working fine. The problem occurs when I try to click or double click a filtered record to open another form and I get the errer "Runtime error 7591. You entered an expression that has an invalid reference to the recordset clonse property.
Any ideas?
Any ideas?
Code:
Private Sub tanklist_AfterUpdate()
DoCmd.Requery
Me.RecordsetClone.FindFirst "[tankno] = '" & Me![TankList] & "'"
If Not Me.RecordsetClone.NoMatch Then
Me.Bookmark = Me.RecordsetClone.Bookmark
Else
MsgBox "Could not locate [" & Me![TankList] & "]"
End If
End Sub
Private Sub TankList_DblClick(Cancel As Integer)
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "ftankinfo"
stLinkCriteria = "[TankNo]=" & "'" & Me![TankList] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
End Sub