I have a split form in datasheet view. The build-in search box at the bottom of the form is been used frequently form users. If the form’s
RecordsetType=Snapshot
then the searching is very quick. If
RecordsetType=Dynaset
then is very slow.
I made my own textbox as search box with the following code. There has been improvement but not like when
RecodsetType=Snapshot
```:
Private Sub txtSearch_Change()
On Error GoTo ErrorHandler
Dim searchText As String
Dim sql As String
searchText = Me.txtSearch.Text
Dim rs As Recordset 'default DAO recordset
Set rs = Me.RecordsetClone
rs.FindFirst "[f1] like '*" & searchText & "*'"
If Not rs.NoMatch Then
Me.Bookmark = rs.Bookmark
Else
MsgBox "Not Found!"
End If
Me.txtSearch.SetFocus
Me.txtSearch.SelStart = Len(searchText)
Exit Sub
ErrorHandler:
MsgBox “Error Number: ” & Err.Number & vbCrLf & Err.description
End Sub
The form has
AllowAdditons=False
and only one check field has the need to update. So I thought to search to find if I can have datasheet or continuous unbound form and to manipulate the update to only one field through VBA. But I have found only for single forms.