Report running slow

G

Guest

I have a form that has a control source of "table1". I also have a combo box
that is pulling data from another table (table2) through a query. That table
has 44 fields in it. I'm selecting a record from that combo box and then I am
printing a report for that specific record that is displayed on the screen.
I'm using a query filter to print just that record. On the report I have
fields that are linked to the other 43 fields on table 2 through that query I
mentioned earlier. When I load the print preview of that report it takes a
good 15-20 seconds to load because of the 43 fields I am pulling from the
query. Is there an easier way to pull this information so that the print
preview will run faster?
 
G

Guest

Hi Secret Squirrel,

Why are you linking 43 fields together... or do you mean you have a single
link and are picking up 43 fields?

Are you using a criteria like "where ID = forms!FORMNAME.COMBONAME" in your
query?

Damian.
 
G

Guest

This was the only way I could pull the other fields onto the report. At least
that's the way I thought I should be doing it.

My query on the form is for selecting a record from another table. That
other table has 43 other fields that I also need to print on the report. I
select the record from the combo box and then preview the report. At this
point it takes forever to load the preview since it's also pulling the other
fields as well. I'm using [Forms]![HeatNumber].Column(3) as the control
source for the fields on the report. The "HeatNumber" field is the combobox
 
G

Guest

Hi again,

You should be doing the restriction in the query, and basically only the
primary key should need to be restricted, as this is what uniquely identifies
a record.

How about you open your query in SQL view and post it here for us to have a
look at.

D.


Secret Squirrel said:
This was the only way I could pull the other fields onto the report. At least
that's the way I thought I should be doing it.

My query on the form is for selecting a record from another table. That
other table has 43 other fields that I also need to print on the report. I
select the record from the combo box and then preview the report. At this
point it takes forever to load the preview since it's also pulling the other
fields as well. I'm using [Forms]![HeatNumber].Column(3) as the control
source for the fields on the report. The "HeatNumber" field is the combobox
Hi Secret Squirrel,

Why are you linking 43 fields together... or do you mean you have a single
link and are picking up 43 fields?

Are you using a criteria like "where ID = forms!FORMNAME.COMBONAME" in your
query?

Damian.
 
G

Guest

Hi SS,

Is there some way that the tblHeatCerts table joins to tblHeats? If there
is, inner join it into the list and put the where clause into that query.

Damian.

Secret Squirrel said:
Hi D,

Here are the two queries. The first one is the query I am using to select
the record on my form. The second is the filter I am using to filter the
record to my report/preview

SELECT tblHeats.HeatID, tblHeats.HeatNumber, tblHeats.Suffix,
tblSupplier.Supplier, tblHeats.ElementC, tblHeats.ElementMN,
tblHeats.ElementSI, tblHeats.ElementP, tblHeats.ElementS, tblHeats.ElementCR,
tblHeats.ElementNI, tblHeats.ElementMO, tblHeats.ElementCU,
tblHeats.ElementCBTA, tblHeats.ElementTI, tblHeats.ElementCO,
tblHeats.ElementAL, tblHeats.ElementSE, tblHeats.ElementSN,
tblHeats.ElementV, tblHeats.ElementN, tblHeats.ElementB,
tblHeats.YieldStrength1, tblHeats.TensileStrength1, tblHeats.Elongation1,
tblHeats.Reduction1, tblHeats.ShipHardness1, tblHeats.Hardenability1,
tblHeats.MicroStructure1, tblHeats.Macrotech1, tblHeats.GrainSize1,
tblHeats.Ultrasonic1, tblHeats.YieldStrength2, tblHeats.TensileStrength2,
tblHeats.Elongation2, tblHeats.Reduction2, tblHeats.ShipHardness2,
tblHeats.Hardenability2, tblHeats.MicroStructure2, tblHeats.Macrotech2,
tblHeats.GrainSize2, tblHeats.Ultrasonic2, tblCapabilities.Capabilities,
tblMill.Mill
FROM tblMill INNER JOIN (tblSupplier INNER JOIN (tblCapabilities INNER JOIN
tblHeats ON tblCapabilities.ID = tblHeats.Capabilities) ON
tblSupplier.SupplierID = tblHeats.Supplier) ON tblMill.MillID = tblHeats.Mill
ORDER BY tblHeats.HeatNumber;


SELECT tblHeatCerts.*, tblHeatCerts.CertID
FROM tblHeatCerts
WHERE (((tblHeatCerts.CertID)=[Forms]![frmHeatCerts]![CertID]));

Once I select the record from the first query I then pull the balance of the
fields onto the report using the
[Forms]![frmHeatCerts]![HeatNumber].Column(3) code for each of the fields.


Damian S said:
Hi again,

You should be doing the restriction in the query, and basically only the
primary key should need to be restricted, as this is what uniquely identifies
a record.

How about you open your query in SQL view and post it here for us to have a
look at.

D.


Secret Squirrel said:
This was the only way I could pull the other fields onto the report. At least
that's the way I thought I should be doing it.

My query on the form is for selecting a record from another table. That
other table has 43 other fields that I also need to print on the report. I
select the record from the combo box and then preview the report. At this
point it takes forever to load the preview since it's also pulling the other
fields as well. I'm using [Forms]![HeatNumber].Column(3) as the control
source for the fields on the report. The "HeatNumber" field is the combobox
on my form that I use to select the record.

:

Hi Secret Squirrel,

Why are you linking 43 fields together... or do you mean you have a single
link and are picking up 43 fields?

Are you using a criteria like "where ID = forms!FORMNAME.COMBONAME" in your
query?

Damian.

:

I have a form that has a control source of "table1". I also have a combo box
that is pulling data from another table (table2) through a query. That table
has 44 fields in it. I'm selecting a record from that combo box and then I am
printing a report for that specific record that is displayed on the screen.
I'm using a query filter to print just that record. On the report I have
fields that are linked to the other 43 fields on table 2 through that query I
mentioned earlier. When I load the print preview of that report it takes a
good 15-20 seconds to load because of the 43 fields I am pulling from the
query. Is there an easier way to pull this information so that the print
preview will run faster?
 

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

Similar Threads


Top