Question for Duane Hookom Re: Concatenate

G

Gina Whipp

Duane,

First of all, thanks for directing me to your module, works like a charm...

Here's my problem..

I have to run a query (qryItemNumbers) to sort out what I want from the
table first:

SELECT tblFFESpecificationStyle.ffessFFESpecificationID,
tblStyleCodes.scName, tblFFESpecificationStyle.ffessDescription
FROM tblStyleCodes INNER JOIN tblFFESpecificationStyle ON
tblStyleCodes.scStyleCodeID = tblFFESpecificationStyle.ffessStyleCodeID
WHERE (((tblStyleCodes.scItemID)=-1))
ORDER BY tblFFESpecificationStyle.ffessFFESpecificationID;

Then I run a query to get that data into a report, using the line below as
one of the fields in the query:

Description: Concatenate("SELECT ffessDescription FROM qryItemNumbers WHERE
ffessFFESpecificationID =" & [ffesFFESpecificationID])

However, the second query runs slow (obviously), any ideas how I can speed
it up?

Thanks for any insight you can give me
Gina Whipp

"I feel I have been denied critical, need to know, information!" - Tremors
II
 
D

Duane Hookom

You need to make sure that ffessFFESpecificationID is indexed. I suppose you
could create and use a global database and recordset object rather than
creating and destroying with each call to the function.
 
G

Gina Whipp

Yes, ffessFFESpecificationID is indexed: PK-tblFFESpecification and
FK-tblFFESpecificationStyle. Perhaps, I should try your second suggestion.

Thanks,
Gina Whipp


Duane Hookom said:
You need to make sure that ffessFFESpecificationID is indexed. I suppose
you could create and use a global database and recordset object rather
than creating and destroying with each call to the function.


--
Duane Hookom
MS Access MVP

Gina Whipp said:
Duane,

First of all, thanks for directing me to your module, works like a
charm...

Here's my problem..

I have to run a query (qryItemNumbers) to sort out what I want from the
table first:

SELECT tblFFESpecificationStyle.ffessFFESpecificationID,
tblStyleCodes.scName, tblFFESpecificationStyle.ffessDescription
FROM tblStyleCodes INNER JOIN tblFFESpecificationStyle ON
tblStyleCodes.scStyleCodeID = tblFFESpecificationStyle.ffessStyleCodeID
WHERE (((tblStyleCodes.scItemID)=-1))
ORDER BY tblFFESpecificationStyle.ffessFFESpecificationID;

Then I run a query to get that data into a report, using the line below
as one of the fields in the query:

Description: Concatenate("SELECT ffessDescription FROM qryItemNumbers
WHERE ffessFFESpecificationID =" & [ffesFFESpecificationID])

However, the second query runs slow (obviously), any ideas how I can
speed it up?

Thanks for any insight you can give me
Gina Whipp

"I feel I have been denied critical, need to know, information!" -
Tremors II
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top