473,394 Members | 1,737 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,394 software developers and data experts.

Lag at bottom of subform.

I know this has been discussed, but I can't find a resolution. I have
a subform on a form. The table with the data for the main form has
15,000 records. I am opening and then setting recordsource so as to
only pull 1 record.

The table where the subform data comes from has 130,000 records. There
is a parent/child link. Indexed on those fields. I have set the
datasource to the table, SQL statements and a number of different
queries to limit the data. Anyway I do it, it is SLOW. But only
slow if the new record * is visible. If the new record indicator is
scrolled off the bottom of the page, there performance is fine. But if
you scroll down, there is a big 5 second lag to display the new record.

Adding new records as a result is very slow and aggravating for the
users.

If I open a query with the same data, the results are instantaneous.
Also if I set the datamode to snapshot it is fast, but then you can't
add records which is where the problem is anyway.

By the way the typical display of subform records is only about 12.

Does anyone know of a way around this quagmire?

Aug 12 '06 #1
4 1981
aq*****@gmail.com wrote:
I know this has been discussed, but I can't find a resolution. I have
a subform on a form. The table with the data for the main form has
15,000 records. I am opening and then setting recordsource so as to
only pull 1 record.

The table where the subform data comes from has 130,000 records. There
is a parent/child link. Indexed on those fields. I have set the
datasource to the table, SQL statements and a number of different
queries to limit the data. Anyway I do it, it is SLOW. But only
slow if the new record * is visible. If the new record indicator is
scrolled off the bottom of the page, there performance is fine. But if
you scroll down, there is a big 5 second lag to display the new record.

Adding new records as a result is very slow and aggravating for the
users.

If I open a query with the same data, the results are instantaneous.
Also if I set the datamode to snapshot it is fast, but then you can't
add records which is where the problem is anyway.

By the way the typical display of subform records is only about 12.

Does anyone know of a way around this quagmire?
If it's been discussed but no solution provided, it must be one of those
left-field type problems.

Maybe create a new form, copy all of the controls from the old main form
into it, copy all the code from old to new, insert the subform. Maybe
do the same for the subform.

Also, do you step through the code when a new record is added? Maybe
something is being done in the background that you forgot about.

If worse gets to worse, create an add button on the main form. Set the
subform to AddNewRecs to False. When the AddButton is pressed, create a
new record via DAO/ADO...whatever your preference. Then requery the
subform and set the bookmark of the subform to the new record.

Aug 12 '06 #2
Thanks

I have cleared out all of the code. Just the raw access forms. Has
anyone had experience with 100k rows in a table that was used for a
subform.

These are line items on invoices.

Preston
salad wrote:
aq*****@gmail.com wrote:
I know this has been discussed, but I can't find a resolution. I have
a subform on a form. The table with the data for the main form has
15,000 records. I am opening and then setting recordsource so as to
only pull 1 record.

The table where the subform data comes from has 130,000 records. There
is a parent/child link. Indexed on those fields. I have set the
datasource to the table, SQL statements and a number of different
queries to limit the data. Anyway I do it, it is SLOW. But only
slow if the new record * is visible. If the new record indicator is
scrolled off the bottom of the page, there performance is fine. But if
you scroll down, there is a big 5 second lag to display the new record.

Adding new records as a result is very slow and aggravating for the
users.

If I open a query with the same data, the results are instantaneous.
Also if I set the datamode to snapshot it is fast, but then you can't
add records which is where the problem is anyway.

By the way the typical display of subform records is only about 12.

Does anyone know of a way around this quagmire?
If it's been discussed but no solution provided, it must be one of those
left-field type problems.

Maybe create a new form, copy all of the controls from the old main form
into it, copy all the code from old to new, insert the subform. Maybe
do the same for the subform.

Also, do you step through the code when a new record is added? Maybe
something is being done in the background that you forgot about.

If worse gets to worse, create an add button on the main form. Set the
subform to AddNewRecs to False. When the AddButton is pressed, create a
new record via DAO/ADO...whatever your preference. Then requery the
subform and set the bookmark of the subform to the new record.
Aug 12 '06 #3
aq*****@gmail.com wrote:
Thanks

I have cleared out all of the code. Just the raw access forms. Has
anyone had experience with 100k rows in a table that was used for a
subform.

These are line items on invoices.

Preston
When you cleared the code out did that change the speed?

I doubt few people would ever want 100K rows returned in a subform

You could do something like this from the MainForms OnCurrentEvent.
Assumes the link between both form and subform are linked by a field
called ID
Me("SubFormName").Form.Filter = "ID = " & Me.ID
Me("SubFormName").Form.FilterOn = True
and in the SubForms OnOpen event have something like
Me("SubFormName").Form.Filter = "ID = -1"
Me("SubFormName").Form.FilterOn = True

You might need to make an adjustment to this if a new record...depends
if you are using an autonumber that hasn't been generated by the time
the OnCurrent event finishes executing.

>

salad wrote:
>>aq*****@gmail.com wrote:

>>>I know this has been discussed, but I can't find a resolution. I have
a subform on a form. The table with the data for the main form has
15,000 records. I am opening and then setting recordsource so as to
only pull 1 record.

The table where the subform data comes from has 130,000 records. There
is a parent/child link. Indexed on those fields. I have set the
datasource to the table, SQL statements and a number of different
queries to limit the data. Anyway I do it, it is SLOW. But only
slow if the new record * is visible. If the new record indicator is
scrolled off the bottom of the page, there performance is fine. But if
you scroll down, there is a big 5 second lag to display the new record.

Adding new records as a result is very slow and aggravating for the
users.

If I open a query with the same data, the results are instantaneous.
Also if I set the datamode to snapshot it is fast, but then you can't
add records which is where the problem is anyway.

By the way the typical display of subform records is only about 12.

Does anyone know of a way around this quagmire?

If it's been discussed but no solution provided, it must be one of those
left-field type problems.

Maybe create a new form, copy all of the controls from the old main form
into it, copy all the code from old to new, insert the subform. Maybe
do the same for the subform.

Also, do you step through the code when a new record is added? Maybe
something is being done in the background that you forgot about.

If worse gets to worse, create an add button on the main form. Set the
subform to AddNewRecs to False. When the AddButton is pressed, create a
new record via DAO/ADO...whatever your preference. Then requery the
subform and set the bookmark of the subform to the new record.

Aug 12 '06 #4
We I cleared out the code, nothing changed. So I created a new
subform, great performance. (only returning about 12 rows on the
subform.)

I pasted the old controls into new form and the performance drastically
went down.

I finally found a function in the default value of a combo box. It was
the culprit. It is now re-written and perfance is very good, even
great. The function was designed to get the last value of the combo
box by this user with a top n ADO statement. I used a variable to
store the last value used in the new code, much faster, no network
traffic.

Thanks for pointing me in the right direction guys.

Preston
salad wrote:
aq*****@gmail.com wrote:
Thanks

I have cleared out all of the code. Just the raw access forms. Has
anyone had experience with 100k rows in a table that was used for a
subform.

These are line items on invoices.

Preston

When you cleared the code out did that change the speed?

I doubt few people would ever want 100K rows returned in a subform

You could do something like this from the MainForms OnCurrentEvent.
Assumes the link between both form and subform are linked by a field
called ID
Me("SubFormName").Form.Filter = "ID = " & Me.ID
Me("SubFormName").Form.FilterOn = True
and in the SubForms OnOpen event have something like
Me("SubFormName").Form.Filter = "ID = -1"
Me("SubFormName").Form.FilterOn = True

You might need to make an adjustment to this if a new record...depends
if you are using an autonumber that hasn't been generated by the time
the OnCurrent event finishes executing.



salad wrote:
>aq*****@gmail.com wrote:
I know this has been discussed, but I can't find a resolution. I have
a subform on a form. The table with the data for the main form has
15,000 records. I am opening and then setting recordsource so as to
only pull 1 record.

The table where the subform data comes from has 130,000 records. There
is a parent/child link. Indexed on those fields. I have set the
datasource to the table, SQL statements and a number of different
queries to limit the data. Anyway I do it, it is SLOW. But only
slow if the new record * is visible. If the new record indicator is
scrolled off the bottom of the page, there performance is fine. But if
you scroll down, there is a big 5 second lag to display the new record.

Adding new records as a result is very slow and aggravating for the
users.

If I open a query with the same data, the results are instantaneous.
Also if I set the datamode to snapshot it is fast, but then you can't
add records which is where the problem is anyway.

By the way the typical display of subform records is only about 12.

Does anyone know of a way around this quagmire?
If it's been discussed but no solution provided, it must be one of those
left-field type problems.

Maybe create a new form, copy all of the controls from the old main form
into it, copy all the code from old to new, insert the subform. Maybe
do the same for the subform.

Also, do you step through the code when a new record is added? Maybe
something is being done in the background that you forgot about.

If worse gets to worse, create an add button on the main form. Set the
subform to AddNewRecs to False. When the AddButton is pressed, create a
new record via DAO/ADO...whatever your preference. Then requery the
subform and set the bookmark of the subform to the new record.
Aug 12 '06 #5

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

Similar topics

15
by: Rey | last post by:
Howdy all. Appreciate your help with several problems I'm having: I'm trying to determine if the Visit subform (subformVisits) has a new record or been changed, i.e. dirty. The form that...
25
by: Lyn | last post by:
Hi, I am working on a genealogy form. The only table (so far) lists everybody in the family, one record per person. Each record has an autonum ID. The parent form (frmMainForm) displays the...
1
by: John Michael | last post by:
I have a form that has a subform that has a subform. The subform loads a record based on a combo lookup box in the main form. I'm trying to set a value in the subform based on a value in a...
4
by: Dave Boyd | last post by:
Hi, I have two very similar forms each with a subform. The main form gets a few fields from the user and passes this back to a query that the subform is bound to. The requery is done when the...
1
by: MP | last post by:
I have a main form that has a subform which also has a subform: the main form is the first subform is the second subform is When I click on the button »AddNewSubSubRecord« (add a new record...
13
by: Greg | last post by:
Most suggestions on this topic recommend to use a page footer and make it visible only on the last page. My problem is that the footer is half of the height of a page which means the detail would...
6
by: DMUM via AccessMonster.com | last post by:
Hello I am trying to pass the name of my subform to a function/sub but I can't seem to get it to work. I am using an autokey function (ctrl E) to unlock text boxes on a subform. I have a few...
4
by: Macbane | last post by:
Hi, I have a 'main' form called frmIssues which has a subform control (named linkIssuesDrug) containing the subform sfrmLink_Issues_Drugs. A control button on the main form opens a pop-up form...
7
by: ApexData | last post by:
I am using the following code in my TabControl to manage subform loads. The code assigns the subForms SourceObject. - Do I also need code to DeAssign the SourceObject when leaving the Tab, I'm...
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
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.