473,387 Members | 1,760 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

RecordsetClone only retreives 100 records in ADP

Br
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
Nov 13 '05 #1
9 2213
stick a DoEvents command in there to force it to finish before going on
to the next line?
------------------------------------------------------------------
"pay no attention to the man behind the curtain"

Nov 13 '05 #2
Br
pi********@hotmail.com wrote:
stick a DoEvents command in there to force it to finish before going
on to the next line?


That is one of the things that had been suggested before. It doesn't
have any effect.

Things I've tried include:
- DoEvents
- moving to last/first record
- if RecordCount = 100 go and get the RecordsetClone again
- Me.Requery/Me.Refresh
--
regards,

Bradley

A Christian Response
http://www.pastornet.net.au/response
Nov 13 '05 #3


Br@dley wrote:
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.


A solution is to open an ADP recordset and to set the form's recordset
to that. This is not appreciably slower than using a recordsource
string.

The topic is discussed in
http://groups.google.ca/group/comp.d...6d7ed38ae217d8

Nov 13 '05 #4
Br
ly******@yahoo.ca wrote:
Br@dley wrote:
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.


A solution is to open an ADP recordset and to set the form's recordset
to that. This is not appreciably slower than using a recordsource
string.

The topic is discussed in
http://groups.google.ca/group/comp.d...6d7ed38ae217d8


It'd be good to know why it happens. We have it happen on a few forms in
different systems. Some start working again for no noticeable reason,
some we didn't notice weren't working because they hadn't hit the 100
records mark, others never have a problem yet run almost identical code.
I thinkwe've also had it happen in comboboxes.

I think for me the best solution is to redesign the interface. Instead
of calling up the form with the full dataset and moving to the record I
want I will open the form with just that record. I'll then use a
seperate form for adding new records. In the end that'll be better for
the users anyway.
--
regards,

Bradley

A Christian Response
http://www.pastornet.net.au/response
Nov 13 '05 #5
Br
ly******@yahoo.ca wrote:
Br@dley wrote:
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.


A solution is to open an ADP recordset and to set the form's recordset
to that. This is not appreciably slower than using a recordsource
string.

The topic is discussed in
http://groups.google.ca/group/comp.d...6d7ed38ae217d8


It'd be good to know why it happens. We have it happen on a few forms in
different systems. Some start working again for no noticeable reason,
some we didn't notice weren't working because they hadn't hit the 100
records mark, others never have a problem yet run almost identical code.
I thinkwe've also had it happen in comboboxes.

I think for me the best solution is to redesign the interface. Instead
of calling up the form with the full dataset and moving to the record I
want I will open the form with just that record. I'll then use a
seperate form for adding new records. In the end that'll be better for
the users anyway.
--
regards,

Bradley

A Christian Response
http://www.pastornet.net.au/response
Nov 13 '05 #6


Br@dley wrote:
ly******@yahoo.ca wrote:

The topic is discussed in
http://groups.google.ca/group/comp.d...6d7ed38ae217d8


It'd be good to know why it happens.


Did you read the referenced thread?

Nov 13 '05 #7


Br@dley wrote:
ly******@yahoo.ca wrote:

The topic is discussed in
http://groups.google.ca/group/comp.d...6d7ed38ae217d8


It'd be good to know why it happens.


Did you read the referenced thread?

Nov 13 '05 #8
Br
ly******@yahoo.ca wrote:
Br@dley wrote:
ly******@yahoo.ca wrote:

The topic is discussed in
http://groups.google.ca/group/comp.d...6d7ed38ae217d8


It'd be good to know why it happens.


Did you read the referenced thread?


I read the post the link pointed to.....
--
regards,

Bradley

A Christian Response
http://www.pastornet.net.au/response
Nov 13 '05 #9
Br
ly******@yahoo.ca wrote:
Br@dley wrote:
ly******@yahoo.ca wrote:

The topic is discussed in
http://groups.google.ca/group/comp.d...6d7ed38ae217d8


It'd be good to know why it happens.


Did you read the referenced thread?


I read the post the link pointed to.....
--
regards,

Bradley

A Christian Response
http://www.pastornet.net.au/response
Nov 13 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Anthony Kroes | last post by:
I have a subform on a form and they are not linked. On the main form is a text box where the user types in a number. When that number changes, I have some code to make the corresponding text...
3
by: GGerard | last post by:
Hello I am trying to refer in code to the RecordsetClone of a subform datasheet but I'm getting syntax errors. This is what I am writing: Set MyDB = DBEngine.Workspaces(0).Databases(0)...
22
by: Br | last post by:
First issue: When using ADPs you no longer have the ability to issue a me.refresh to save the current record on a form (the me.refresh does a requery in an ADP). We usually do this before...
8
by: Josetta | last post by:
I have found a wealth of information here on how to duplicate records in forms with subforms. I have adapted code found here to work with my forms. It works beautifully the first time I hit the...
3
by: G Gerard | last post by:
Hello Can I write an SQL statement in code using a RecordSetClone of an open form? something like: MySQL = "UPDATE Me!Child0.Form.RecordSetClone SET Me!Child0.Form.RecordSetClone.MyField =...
1
by: Orchid | last post by:
Hello all, I have a Combo Box on a form with selection of a firm list. When the users select a firm from the Combo Box and if the firm has branch(es), a list of branch(es) of the firm opens in a...
10
by: d.francis | last post by:
I have converted an Access 97 database to Access 2003 The following code now fails and returns Run-time error '3420' Dim rst as DAO.recordset Set rst = Forms!frm1!frm2.Form.RecordsetClone I...
2
by: Certys | last post by:
Hello, I have a form where I only allow new records to be added. I enable this by setting the form property "Data Entry" to Yes. I want to access other records in the same table- to autofill...
10
by: nspader | last post by:
Hello All, I have developed a program to automatically generate and send reports based on certain criteria. I have realized that there is a problem with its navigation. I will post the code...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.