Hitting get report twice

J

jtfalk

I have to open,close, and reopen a form with a combox to pass the correct
department to my report/chart to pull up the correct department. I looked and
the table is being populated with the correct department but the query is
running with the previous entry.

Does this make since?
 
K

KARL DEWEY

I looked and the table is being populated with the correct department but
the query is running with the previous entry.
To me this is an odd statement. My methods entail form-query-report.

Just how does your process flow from your form - through a table? - to query
- to report? Why through a table?
 
J

jtfalk

I am passing from the form to the table into the query. i have to think that
it is the query at fault. Here is the 2 query's:

q2
SELECT DateAdd("D",-Weekday([Issue Date])+1,[Issue Date]) AS WeekOf,
Issues.ID AS [Total Tags], Sum(IIf([Validation Date]<>0,1,0)) AS [Tags
Closed], Sum(IIf([Validation Date]<>0,0,1)) AS [Tags Opened] FROM Issues,
SpecificTagLogReportsMASCharts WHERE (((Issues.Department) Like [Forms]![View
Model Area Identification]![Combo6]) AND ((Issues.[Machine Station]) Like
[Forms]![View Model Area Identification]![Combo24] Or (Issues.[Machine
Station]) Like [Forms]![View Model Area Identification]![Combo30] Or
(Issues.[Machine Station]) Like [Forms]![View Model Area
Identification]![Combo32]) AND ((SpecificTagLogReportsMASCharts.[Model
Area])="AM/PM Dept")) OR (((Issues.Department) Like [Forms]![View Model Area
Identification]![Combo49]) AND ((Issues.[Machine Station]) Like [Forms]![View
Model Area Identification]![Combo51] Or (Issues.[Machine Station]) Like
[Forms]![View Model Area Identification]![Combo53] Or (Issues.[Machine
Station]) Like [Forms]![View Model Area Identification]![Combo55]) AND
((SpecificTagLogReportsMASCharts.[Model Area])="WO/LO Dept")) OR
(((Issues.Department) Like [Forms]![View Model Area
Identification]![Combo61]) AND ((Issues.[Machine Station]) Like [Forms]![View
Model Area Identification]![Combo63] Or (Issues.[Machine Station]) Like
[Forms]![View Model Area Identification]![Combo65] Or (Issues.[Machine
Station]) Like [Forms]![View Model Area Identification]![Combo67]) AND
((SpecificTagLogReportsMASCharts.[Model Area])="Safety Dept")) OR
(((Issues.Department) Like [Forms]![View Model Area
Identification]![Combo74]) AND ((Issues.[Machine Station]) Like [Forms]![View
Model Area Identification]![Combo76] Or (Issues.[Machine Station]) Like
[Forms]![View Model Area Identification]![Combo78] Or (Issues.[Machine
Station]) Like [Forms]![View Model Area Identification]![Combo80]) AND
((SpecificTagLogReportsMASCharts.[Model Area])="QC Dept"));

q2_2
SELECT q2.WeekOf, q2_1.[Tags Opened] AS [SumOfTags Opened1], q2_1.[Tags
Closed] AS [SumOfTags Closed1], q2_1.[Total Tags] AS [SumOfTotal Tags1] FROM
q2 WHERE (((q2.WeekOf)>=[q2_1].[weekOf]));
 
K

KARL DEWEY

Specifically how are you passing it from form to the table?

I assume you are passing it to table named Issues.


--
Build a little, test a little.


jtfalk said:
I am passing from the form to the table into the query. i have to think that
it is the query at fault. Here is the 2 query's:

q2
SELECT DateAdd("D",-Weekday([Issue Date])+1,[Issue Date]) AS WeekOf,
Issues.ID AS [Total Tags], Sum(IIf([Validation Date]<>0,1,0)) AS [Tags
Closed], Sum(IIf([Validation Date]<>0,0,1)) AS [Tags Opened] FROM Issues,
SpecificTagLogReportsMASCharts WHERE (((Issues.Department) Like [Forms]![View
Model Area Identification]![Combo6]) AND ((Issues.[Machine Station]) Like
[Forms]![View Model Area Identification]![Combo24] Or (Issues.[Machine
Station]) Like [Forms]![View Model Area Identification]![Combo30] Or
(Issues.[Machine Station]) Like [Forms]![View Model Area
Identification]![Combo32]) AND ((SpecificTagLogReportsMASCharts.[Model
Area])="AM/PM Dept")) OR (((Issues.Department) Like [Forms]![View Model Area
Identification]![Combo49]) AND ((Issues.[Machine Station]) Like [Forms]![View
Model Area Identification]![Combo51] Or (Issues.[Machine Station]) Like
[Forms]![View Model Area Identification]![Combo53] Or (Issues.[Machine
Station]) Like [Forms]![View Model Area Identification]![Combo55]) AND
((SpecificTagLogReportsMASCharts.[Model Area])="WO/LO Dept")) OR
(((Issues.Department) Like [Forms]![View Model Area
Identification]![Combo61]) AND ((Issues.[Machine Station]) Like [Forms]![View
Model Area Identification]![Combo63] Or (Issues.[Machine Station]) Like
[Forms]![View Model Area Identification]![Combo65] Or (Issues.[Machine
Station]) Like [Forms]![View Model Area Identification]![Combo67]) AND
((SpecificTagLogReportsMASCharts.[Model Area])="Safety Dept")) OR
(((Issues.Department) Like [Forms]![View Model Area
Identification]![Combo74]) AND ((Issues.[Machine Station]) Like [Forms]![View
Model Area Identification]![Combo76] Or (Issues.[Machine Station]) Like
[Forms]![View Model Area Identification]![Combo78] Or (Issues.[Machine
Station]) Like [Forms]![View Model Area Identification]![Combo80]) AND
((SpecificTagLogReportsMASCharts.[Model Area])="QC Dept"));

q2_2
SELECT q2.WeekOf, q2_1.[Tags Opened] AS [SumOfTags Opened1], q2_1.[Tags
Closed] AS [SumOfTags Closed1], q2_1.[Total Tags] AS [SumOfTotal Tags1] FROM
q2 WHERE (((q2.WeekOf)>=[q2_1].[weekOf]));

KARL DEWEY said:
the query is running with the previous entry.
To me this is an odd statement. My methods entail form-query-report.

Just how does your process flow from your form - through a table? - to query
- to report? Why through a table?
 
J

jtfalk

I am passing it to table SpecificTagLogReportsMASCharts.

I have it in the Record Source of the form itself:
SELECT SpecificTagLogReportsMASCharts.[Model Area],
SpecificTagLogReportsMASCharts.Status FROM SpecificTagLogReportsMASCharts;

Then I have the control source (model area) in the combo32 box. I have the
combox row source from another table with 4 options SELECT
WCMmodelpillars.[Model Area] FROM WCMmodelpillars; I tried this because I
did have the row source type as a list and listed them. i thought that was
the reason why so I referenced this new table.

KARL DEWEY said:
Specifically how are you passing it from form to the table?

I assume you are passing it to table named Issues.


--
Build a little, test a little.


jtfalk said:
I am passing from the form to the table into the query. i have to think that
it is the query at fault. Here is the 2 query's:

q2
SELECT DateAdd("D",-Weekday([Issue Date])+1,[Issue Date]) AS WeekOf,
Issues.ID AS [Total Tags], Sum(IIf([Validation Date]<>0,1,0)) AS [Tags
Closed], Sum(IIf([Validation Date]<>0,0,1)) AS [Tags Opened] FROM Issues,
SpecificTagLogReportsMASCharts WHERE (((Issues.Department) Like [Forms]![View
Model Area Identification]![Combo6]) AND ((Issues.[Machine Station]) Like
[Forms]![View Model Area Identification]![Combo24] Or (Issues.[Machine
Station]) Like [Forms]![View Model Area Identification]![Combo30] Or
(Issues.[Machine Station]) Like [Forms]![View Model Area
Identification]![Combo32]) AND ((SpecificTagLogReportsMASCharts.[Model
Area])="AM/PM Dept")) OR (((Issues.Department) Like [Forms]![View Model Area
Identification]![Combo49]) AND ((Issues.[Machine Station]) Like [Forms]![View
Model Area Identification]![Combo51] Or (Issues.[Machine Station]) Like
[Forms]![View Model Area Identification]![Combo53] Or (Issues.[Machine
Station]) Like [Forms]![View Model Area Identification]![Combo55]) AND
((SpecificTagLogReportsMASCharts.[Model Area])="WO/LO Dept")) OR
(((Issues.Department) Like [Forms]![View Model Area
Identification]![Combo61]) AND ((Issues.[Machine Station]) Like [Forms]![View
Model Area Identification]![Combo63] Or (Issues.[Machine Station]) Like
[Forms]![View Model Area Identification]![Combo65] Or (Issues.[Machine
Station]) Like [Forms]![View Model Area Identification]![Combo67]) AND
((SpecificTagLogReportsMASCharts.[Model Area])="Safety Dept")) OR
(((Issues.Department) Like [Forms]![View Model Area
Identification]![Combo74]) AND ((Issues.[Machine Station]) Like [Forms]![View
Model Area Identification]![Combo76] Or (Issues.[Machine Station]) Like
[Forms]![View Model Area Identification]![Combo78] Or (Issues.[Machine
Station]) Like [Forms]![View Model Area Identification]![Combo80]) AND
((SpecificTagLogReportsMASCharts.[Model Area])="QC Dept"));

q2_2
SELECT q2.WeekOf, q2_1.[Tags Opened] AS [SumOfTags Opened1], q2_1.[Tags
Closed] AS [SumOfTags Closed1], q2_1.[Total Tags] AS [SumOfTotal Tags1] FROM
q2 WHERE (((q2.WeekOf)>=[q2_1].[weekOf]));

KARL DEWEY said:
I looked and the table is being populated with the correct department but
the query is running with the previous entry.
To me this is an odd statement. My methods entail form-query-report.

Just how does your process flow from your form - through a table? - to query
- to report? Why through a table?


--
Build a little, test a little.


:

I have to open,close, and reopen a form with a combox to pass the correct
department to my report/chart to pull up the correct department. I looked and
the table is being populated with the correct department but the query is
running with the previous entry.

Does this make since?
 
J

jtfalk

Got it. i had to run in the close the form macro before opening the open
report macro. Did that and it worked perfect

jtfalk said:
I am passing it to table SpecificTagLogReportsMASCharts.

I have it in the Record Source of the form itself:
SELECT SpecificTagLogReportsMASCharts.[Model Area],
SpecificTagLogReportsMASCharts.Status FROM SpecificTagLogReportsMASCharts;

Then I have the control source (model area) in the combo32 box. I have the
combox row source from another table with 4 options SELECT
WCMmodelpillars.[Model Area] FROM WCMmodelpillars; I tried this because I
did have the row source type as a list and listed them. i thought that was
the reason why so I referenced this new table.

KARL DEWEY said:
Specifically how are you passing it from form to the table?

I assume you are passing it to table named Issues.


--
Build a little, test a little.


jtfalk said:
I am passing from the form to the table into the query. i have to think that
it is the query at fault. Here is the 2 query's:

q2
SELECT DateAdd("D",-Weekday([Issue Date])+1,[Issue Date]) AS WeekOf,
Issues.ID AS [Total Tags], Sum(IIf([Validation Date]<>0,1,0)) AS [Tags
Closed], Sum(IIf([Validation Date]<>0,0,1)) AS [Tags Opened] FROM Issues,
SpecificTagLogReportsMASCharts WHERE (((Issues.Department) Like [Forms]![View
Model Area Identification]![Combo6]) AND ((Issues.[Machine Station]) Like
[Forms]![View Model Area Identification]![Combo24] Or (Issues.[Machine
Station]) Like [Forms]![View Model Area Identification]![Combo30] Or
(Issues.[Machine Station]) Like [Forms]![View Model Area
Identification]![Combo32]) AND ((SpecificTagLogReportsMASCharts.[Model
Area])="AM/PM Dept")) OR (((Issues.Department) Like [Forms]![View Model Area
Identification]![Combo49]) AND ((Issues.[Machine Station]) Like [Forms]![View
Model Area Identification]![Combo51] Or (Issues.[Machine Station]) Like
[Forms]![View Model Area Identification]![Combo53] Or (Issues.[Machine
Station]) Like [Forms]![View Model Area Identification]![Combo55]) AND
((SpecificTagLogReportsMASCharts.[Model Area])="WO/LO Dept")) OR
(((Issues.Department) Like [Forms]![View Model Area
Identification]![Combo61]) AND ((Issues.[Machine Station]) Like [Forms]![View
Model Area Identification]![Combo63] Or (Issues.[Machine Station]) Like
[Forms]![View Model Area Identification]![Combo65] Or (Issues.[Machine
Station]) Like [Forms]![View Model Area Identification]![Combo67]) AND
((SpecificTagLogReportsMASCharts.[Model Area])="Safety Dept")) OR
(((Issues.Department) Like [Forms]![View Model Area
Identification]![Combo74]) AND ((Issues.[Machine Station]) Like [Forms]![View
Model Area Identification]![Combo76] Or (Issues.[Machine Station]) Like
[Forms]![View Model Area Identification]![Combo78] Or (Issues.[Machine
Station]) Like [Forms]![View Model Area Identification]![Combo80]) AND
((SpecificTagLogReportsMASCharts.[Model Area])="QC Dept"));

q2_2
SELECT q2.WeekOf, q2_1.[Tags Opened] AS [SumOfTags Opened1], q2_1.[Tags
Closed] AS [SumOfTags Closed1], q2_1.[Total Tags] AS [SumOfTotal Tags1] FROM
q2 WHERE (((q2.WeekOf)>=[q2_1].[weekOf]));

:

I looked and the table is being populated with the correct department but
the query is running with the previous entry.
To me this is an odd statement. My methods entail form-query-report.

Just how does your process flow from your form - through a table? - to query
- to report? Why through a table?


--
Build a little, test a little.


:

I have to open,close, and reopen a form with a combox to pass the correct
department to my report/chart to pull up the correct department. I looked and
the table is being populated with the correct department but the query is
running with the previous entry.

Does this make since?
 

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