We implemented last Monday and the following search is too slow for our customer:
'----------------------
Set rst = Me.RecordsetClone
rst.FindFirst [PKey] = 1111111111
If rst.NoMatch Then
MsgBox "No entry found.", vbInformation
Else
Me.Bookmark = rst.Bookmark
End If
Set rst = Nothing
'-------------------------
The form's records are in order by lastname,firstname so I wanted to use SEEK, but I split the database before implementation and it won't let me use it. When searching by last name, the above code works speedily, but is SLOW on the network with 25,000 records. There is an index on PKey in the table. The recordset is a query ordered by lastname/firstname.
Can I write a back-end vba module to do the seek? But then how would I get the form to go to that record?
BTW the above code is used to find by last name (with slight modifications) and it works fine. Should I take my PKey, pass it to backend VBA with a SEEK, find the LastName, FirstName, pass it back to the form and have it search .FindFirst that way?
HELP!!!
Stressed out in Saint Louis and wondering why I got into this line of work!
'----------------------
Set rst = Me.RecordsetClone
rst.FindFirst [PKey] = 1111111111
If rst.NoMatch Then
MsgBox "No entry found.", vbInformation
Else
Me.Bookmark = rst.Bookmark
End If
Set rst = Nothing
'-------------------------
The form's records are in order by lastname,firstname so I wanted to use SEEK, but I split the database before implementation and it won't let me use it. When searching by last name, the above code works speedily, but is SLOW on the network with 25,000 records. There is an index on PKey in the table. The recordset is a query ordered by lastname/firstname.
Can I write a back-end vba module to do the seek? But then how would I get the form to go to that record?
BTW the above code is used to find by last name (with slight modifications) and it works fine. Should I take my PKey, pass it to backend VBA with a SEEK, find the LastName, FirstName, pass it back to the form and have it search .FindFirst that way?
HELP!!!
Stressed out in Saint Louis and wondering why I got into this line of work!