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

form speed up

ken
Hi,
I'm trying to speed up the loading of my forms. One problem that I
have(probably) is that I have many subforms in the form that I'm trying
to speed up. I can't change that now, but I will redesign for a future
upgrade.
I heard having proper indexes may also speed up form loading. So I was
wondering, if 2 tables have a 1 to many relationship, should both
fields be indexed? I read somewhere that if a field has many records
with the same value an index won't speed things up...? So the primary
key of one table is obiously indexed, should the other field which
completes the relationship be indexed as well?

thanks

Nov 13 '05 #1
8 4242
What do you mean by "the other field which completes the relationship"? Are
you talking about the foreign key in the child table?

Assuming you created actual relationships in Access, the necessary indexes
should have been created for you.

One "trick" is not to load the subforms when you load the form, and load
them afterwards. This can take the form of not having a recordsource defined
for the subforms and setting it programmatically afterwards, or not having
the ObjectSource defined for each of the subform placeholders on the form,
and setting them programmatically.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)

"ken" <ge****@gmail.com> wrote in message
news:11**********************@o13g2000cwo.googlegr oups.com...
Hi,
I'm trying to speed up the loading of my forms. One problem that I
have(probably) is that I have many subforms in the form that I'm trying
to speed up. I can't change that now, but I will redesign for a future
upgrade.
I heard having proper indexes may also speed up form loading. So I was
wondering, if 2 tables have a 1 to many relationship, should both
fields be indexed? I read somewhere that if a field has many records
with the same value an index won't speed things up...? So the primary
key of one table is obiously indexed, should the other field which
completes the relationship be indexed as well?

thanks

Nov 13 '05 #2
ken
Hi...you are correct about "the necessary indexes should have been
created for you. "
One thing that you mentioned about not loading the subforms was
interesting...I was thinking of locking and disabling them...but I
guess that won't stop them from loading...

So to stop them from loading one can on the main form onOpen event set
their source objects?

Also I found out what causes such a delay on my forms...its not really
the subforms, its a list box. This list box is not a very important
part of my forms so I was thinking of making it a pop-up...
this way it won't be loaded everytime one opens the input form...just
when the user needs to use the list

what do you think?

Nov 13 '05 #3
Yes, you can set the source object in the form's Open event.

Having a pop-up for your listbox isn't a bad idea, except if they have to
invoke it multiple times, you'll have the delay each time. You could put
code in the listbox's GotFocus event to check whether or not its RowSource
is set. If it isn't, set it, and you'll only incur the overhead once, when
they actually need to use the listbox.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)

"ken" <ge****@gmail.com> wrote in message
news:11********************@f14g2000cwb.googlegrou ps.com...
Hi...you are correct about "the necessary indexes should have been
created for you. "
One thing that you mentioned about not loading the subforms was
interesting...I was thinking of locking and disabling them...but I
guess that won't stop them from loading...

So to stop them from loading one can on the main form onOpen event set
their source objects?

Also I found out what causes such a delay on my forms...its not really
the subforms, its a list box. This list box is not a very important
part of my forms so I was thinking of making it a pop-up...
this way it won't be loaded everytime one opens the input form...just
when the user needs to use the list

what do you think?

Nov 13 '05 #4
Probably the most useful speed-up I found for forms is to index all join
fields, and limit the number of records with a WHERE clause in the Record
Source... yep, you may need to set the RecordSource after the user chooses
the records they need to see. It is amazing how often that is only one if it
exists, or none if it does not.

This is even more effective in a client-server relationship, but is helpful
in multiuser. It probably makes little or no diference in a monolithic
database where the objects and the data have not been split.

Larry Linson
Microsoft Access MVP

"Douglas J. Steele" <NOSPAM_djsteele@NOSPAM_canada.com> wrote in message
news:I6********************@rogers.com...
Yes, you can set the source object in the form's Open event.

Having a pop-up for your listbox isn't a bad idea, except if they have to
invoke it multiple times, you'll have the delay each time. You could put
code in the listbox's GotFocus event to check whether or not its RowSource
is set. If it isn't, set it, and you'll only incur the overhead once, when
they actually need to use the listbox.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)

"ken" <ge****@gmail.com> wrote in message
news:11********************@f14g2000cwb.googlegrou ps.com...
Hi...you are correct about "the necessary indexes should have been
created for you. "
One thing that you mentioned about not loading the subforms was
interesting...I was thinking of locking and disabling them...but I
guess that won't stop them from loading...

So to stop them from loading one can on the main form onOpen event set
their source objects?

Also I found out what causes such a delay on my forms...its not really
the subforms, its a list box. This list box is not a very important
part of my forms so I was thinking of making it a pop-up...
this way it won't be loaded everytime one opens the input form...just
when the user needs to use the list

what do you think?


Nov 13 '05 #5
ken
Thanks Larry

Nov 13 '05 #6
ken
Thanks Larry and Doug

Nov 13 '05 #7
Douglas J. Steele wrote:
What do you mean by "the other field which completes the relationship"? Are
you talking about the foreign key in the child table?

Assuming you created actual relationships in Access, the necessary indexes
should have been created for you.

One "trick" is not to load the subforms when you load the form, and load
them afterwards. This can take the form of not having a recordsource defined
for the subforms and setting it programmatically afterwards,


Could you explain that please? If the recordsource is blank in the
subform, and all the fields hare a control source of something, won't
Access burp on that? Are you saying to set both recordsource and
control sources when the main form has loaded?
Nov 13 '05 #8
"Salad" <oi*@vinegar.com> wrote in message
news:QJ****************@newsread3.news.pas.earthli nk.net...
Douglas J. Steele wrote:
What do you mean by "the other field which completes the relationship"?
Are you talking about the foreign key in the child table?

Assuming you created actual relationships in Access, the necessary
indexes should have been created for you.

One "trick" is not to load the subforms when you load the form, and load
them afterwards. This can take the form of not having a recordsource
defined for the subforms and setting it programmatically afterwards,


Could you explain that please? If the recordsource is blank in the
subform, and all the fields hare a control source of something, won't
Access burp on that? Are you saying to set both recordsource and control
sources when the main form has loaded?


Yeah, you're right. Not having forms associated with the subform
"placeholders" is the appropriate method.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)

Nov 13 '05 #9

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

Similar topics

1
by: Yaron C. | last post by:
Hello, I would like to ask for your help. I am trying to create a page with table of many form elements. The size of the table is 84x10 (84 rows, 10 columns) and each cell contains 1 form...
3
by: Jay Best | last post by:
Hi there The story is as follows: I write up some pretty detailed reports on people, and what I am wanting to do is speed up the process as a proportion of the reports that I am writing are...
3
by: B | last post by:
I know there are several ways to speed up combo boxes and form loading. Most of the solutions leave rowsource of the combo box blank and set the rowsource to a saved query or an SQL with a where...
4
by: Sean Connery | last post by:
I have a Microsoft UI Process Application Block that is controlling child forms in an MDI parent container. The views node in the app.config file has been set to stayOpen=false. Because there...
9
by: JW | last post by:
Dear NG, Still working on my .NET CF C# forms application ... I have an array of forms that I wish to display in array order, and thus have created a loop to run through them. Due to...
8
by: PAPutzback | last post by:
How do I keep the form up.
32
by: Don Lancaster | last post by:
In an existing, tested and working program, I have a form entry that simplifies to... <INPUT name ="fp1s" type="text" value=0.000 size=12 > and a button of... <input type="button" value="...
3
Corster
by: Corster | last post by:
I'm fairly new to Access, so please have patience... I have an application that I've written to audit all of our computers, monitors etc. which also works-out the Intel processor details from the...
4
by: Jason Huang | last post by:
Hi, I am thinking in comparing developing speed between C# Windows Form and C# Web Form applications. Assuming the scenario is that we have 2 C# coding engineers, engineer A has 2 years...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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...

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.