DoCmd.OpenForm takes very long to load...

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,
In a program I'm writing, the command Docmd.OpenForm takes 15-30 seconds for
some forms, while other forms (with approximately the same amount of
controls, labels, etc.) open in 2-3 seconds.
When debugging and running each line separately, It is obvious that the
OpenForm command is what's taking it so long, and not any other code line.
Moreover, the problematic forms are loaded with a stlinkcriteria, so that
they are required to retrieve only one record from an existing table in the
DB.
The DB is not very large (for example: one of the forms taking so long is
linked to a table containing 715 records)...
Does anybody know the things that may be influencing this the most?
Thanks
 
Two immediate factors:

1. Uncheck the Name Autocorrect boxes under:
Tools | Options | General
The compact the database:
Tools | Database Utilities | Compact.
For an explanation, see:
http://members.iinet.net.au/~allenbrowne/bug-03.html

2. Turn off subdatasheets.
Open your tables in design view.
Open the Properties box (View menu).
Set the Subdatasheet Name property to: [None]
Repeat for all other tables, (esp. any tables used in subforms).

For further suggestions, see the Performance FAQ at:
http://www.granite.ab.ca/access/performancefaq.htm
 
WOW!!
Thanks!

Allen Browne said:
Two immediate factors:

1. Uncheck the Name Autocorrect boxes under:
Tools | Options | General
The compact the database:
Tools | Database Utilities | Compact.
For an explanation, see:
http://members.iinet.net.au/~allenbrowne/bug-03.html

2. Turn off subdatasheets.
Open your tables in design view.
Open the Properties box (View menu).
Set the Subdatasheet Name property to: [None]
Repeat for all other tables, (esp. any tables used in subforms).

For further suggestions, see the Performance FAQ at:
http://www.granite.ab.ca/access/performancefaq.htm

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

dshemesh said:
Hello,
In a program I'm writing, the command Docmd.OpenForm takes 15-30 seconds
for
some forms, while other forms (with approximately the same amount of
controls, labels, etc.) open in 2-3 seconds.
When debugging and running each line separately, It is obvious that the
OpenForm command is what's taking it so long, and not any other code line.
Moreover, the problematic forms are loaded with a stlinkcriteria, so that
they are required to retrieve only one record from an existing table in
the
DB.
The DB is not very large (for example: one of the forms taking so long is
linked to a table containing 715 records)...
Does anybody know the things that may be influencing this the most?
Thanks
 
Back
Top