M
max
Hi all,
I've created two command buttons on my form, with the standard actions
FindFirst and FindNext. The first buttons finds the firs matching record,
but the FindNext button doesn't produce any change.... no error message ....
here's the code:
************************ code starts here ************************
Private Sub cmdFindMedia_Click()
On Error GoTo Err_cmdFindMedia_Click
'Dim rs As Object
strSearch = InputBox("Type the word or part of the word you want to
search.", "Search in the Media Title")
Set rs = Me.Recordset.Clone
rs.FindFirst "medTitle = '" & strSearch & "'"
Me.Bookmark = rs.Bookmark
Exit_cmdFindMedia_Click:
Exit Sub
Err_cmdFindMedia_Click:
MsgBox Err.Description
Resume Exit_cmdFindMedia_Click
End Sub
----------------------------------------------------------------------------
------
Private Sub cmdFindNextMedia_Click()
On Error GoTo Err_cmdFindNextMedia_Click
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindNext "medTitle = '" & strSearch & "'"
Me.Bookmark = rs.Bookmark
Exit_cmdFindNextMedia_Click:
Exit Sub
Err_cmdFindNextMedia_Click:
MsgBox Err.Description
Resume Exit_cmdFindNextMedia_Click
End Sub
************************ code ends here ************************
any idea?
thanks a lot
Max
I've created two command buttons on my form, with the standard actions
FindFirst and FindNext. The first buttons finds the firs matching record,
but the FindNext button doesn't produce any change.... no error message ....
here's the code:
************************ code starts here ************************
Private Sub cmdFindMedia_Click()
On Error GoTo Err_cmdFindMedia_Click
'Dim rs As Object
strSearch = InputBox("Type the word or part of the word you want to
search.", "Search in the Media Title")
Set rs = Me.Recordset.Clone
rs.FindFirst "medTitle = '" & strSearch & "'"
Me.Bookmark = rs.Bookmark
Exit_cmdFindMedia_Click:
Exit Sub
Err_cmdFindMedia_Click:
MsgBox Err.Description
Resume Exit_cmdFindMedia_Click
End Sub
----------------------------------------------------------------------------
------
Private Sub cmdFindNextMedia_Click()
On Error GoTo Err_cmdFindNextMedia_Click
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindNext "medTitle = '" & strSearch & "'"
Me.Bookmark = rs.Bookmark
Exit_cmdFindNextMedia_Click:
Exit Sub
Err_cmdFindNextMedia_Click:
MsgBox Err.Description
Resume Exit_cmdFindNextMedia_Click
End Sub
************************ code ends here ************************
any idea?
thanks a lot
Max