Query speed (1 Viewer)

k209310

Registered User.
Local time
Today, 01:43
Joined
Aug 14, 2002
Messages
185
Hi

I have a query on queries.

I have a combobox in which the row source is decided by a query that depends upon the result of another combo selection. My problem is that this combo is very slow to populate. Although the tables where the info is being taken from are not that great in size.

Is there a quicker way to populate a combo or improve the speed that it populates. Would populating the code via code called from an event be quicker that using a query in the row source.

Any advidce is happily recieved

Chris
 

Fizzio

Chief Torturer
Local time
Today, 01:43
Joined
Feb 21, 2002
Messages
1,885
Are the combos populated by stored querydefs or SQL statements in the rowsource?
 

k209310

Registered User.
Local time
Today, 01:43
Joined
Aug 14, 2002
Messages
185
sql statements in the row source
 

Fizzio

Chief Torturer
Local time
Today, 01:43
Joined
Feb 21, 2002
Messages
1,885
Change them to stored queries initially and see how this affects the performance. In the rowsource, open the qbe grid and save the query. use this saved query as the rowsource (it should update automatically)
 

k209310

Registered User.
Local time
Today, 01:43
Joined
Aug 14, 2002
Messages
185
Thanks Fizzio ill give it a go

heres the SQL

SELECT DISTINCT [tblEndUserDetails (Original)].[Country] FROM tblEtheylene, [tblEndUserDetails (Original)] WHERE ((([tblEndUserDetails (Original)].[MarketType])=[forms]![frmaddEnquiry]![cmbMarket]));

Chris
 
R

Rich

Guest
Do you Requery the second combo on the AfterUpdate of the first?
 

k209310

Registered User.
Local time
Today, 01:43
Joined
Aug 14, 2002
Messages
185
Yes.

When the form is first loaded both combos are empty. Once a selection is made to teh first the second is populated and repopulated if changed.
 

jaydwest

JayW
Local time
Yesterday, 18:43
Joined
Apr 22, 2003
Messages
340
Is the MarketType Field indexed? If not set an index on the field. That will help.
 

Users who are viewing this thread

Top Bottom