In an Access2000 project (ADP) I have a form whose recordsource is a
stored procedure in SQL. On the OnOpen event I run a simple piece of
code to move to a record based on a value on another already open form.
The code fails because the RecordsetClone is only retrieving the first
100 records. If you put a break in the code and trace through it it
works fine so it seems to be a caching issue or something.
I've found others having the same problem but didn't find a solution.
There doesn't seem to be anything about it on MS site.
Any ideas how to get Access to wait until the recordset is populated
before running the code? (Note: putting in a pause loop is not a
solution).
OnOpen()
Dim rstTemp As adodb.Recordset
Set rstTemp = Me.RecordsetClone
rstTemp.Find "[Schedule Code] = " & Forms!frmScheduleScan![Schedule
Code]
If Not rstTemp.EOF Then
Me.Bookmark = rstTemp.Bookmark
End If
--
regards,
Bradley
A Christian Response
http://www.pastornet.net.au/response