I have 2 queries that are very similar but one displays it's contents when it is run by a DoCmd.OpenQuery command and the other does not.
I would like to ensure that neither query does not display its results during run time.. How can I set the query that displays not to?
This query displays its results when the following command is run:
strQuery = "problems_Crosstab"
DoCmd.OpenQuery strQuery, acViewNormal, acReadOnly
----------------
This query does not display its results when the following command is run:
strQuery = "parts_Crosstab"
DoCmd.OpenQuery strQuery, acViewNormal, acReadOnly
I would like to ensure that neither query does not display its results during run time.. How can I set the query that displays not to?
This query displays its results when the following command is run:
strQuery = "problems_Crosstab"
DoCmd.OpenQuery strQuery, acViewNormal, acReadOnly
PARAMETERS [forms]![report]![StartDate] DateTime, [forms]![report]![EndDate] DateTime, [Forms]![report]![team] Text ( 255 );
TRANSFORM CDbl(NZ(Count([codes].[Problem]))) AS [Problems Found]
SELECT [codes].[Problem]
FROM ([FPY Table] LEFT JOIN [codes] ON [FPY Table].PC1 = [codes].[Problem]) LEFT JOIN [team_tbl] ON ([FPY Table].[Assembly Number] = [team_tbl].[Part Number]) AND ([FPY Table].[Part Number] = [team_tbl].[Part Number])
WHERE ((([FPY Table].[Fail Quantity])=1) AND (([FPY Table].Date) Between [forms]![report]![StartDate] And [forms]![report]![EndDate]) AND (([team_tbl].[Nteam])=[Forms]![report]![team]))
GROUP BY [codes].[Problem], [codes].PCID, [team_tbl].[Nteam]
ORDER BY [codes].PCID
PIVOT Format([Date],"mmm") In ("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");
----------------
This query does not display its results when the following command is run:
strQuery = "parts_Crosstab"
DoCmd.OpenQuery strQuery, acViewNormal, acReadOnly
PARAMETERS [forms]![reports]![StartDate] DateTime, [forms]![reports]![EndDate] DateTime, [Forms]![reports]![team] Text ( 255 );
TRANSFORM CDbl(NZ(Count([team_tbl].[Part Number]))) AS [CountOfPart Number]
SELECT [FPY Table].[Part Number], BP.IDESC AS [Desc]
FROM [FPY Table] LEFT JOIN ([team_tbl] LEFT JOIN BP ON [team_tbl].[Part Number] = BPC) ON ([FPY Table].[Part Number] = [team_tbl].[Part Number]) AND ([FPY Table].[Assembly Number] = [team_tbl].[Part Number])
WHERE ((([FPY Table].[Fail Quantity])=1) AND (([FPY Table].Date) Between [forms]![reports]![StartDate] And [forms]![reports]![EndDate]) AND (([team_tbl].[Nteam])=[Forms]![reports]![team]))
GROUP BY [FPY Table].[Part Number], BP.IDESC
ORDER BY [FPY Table].[Part Number]
PIVOT Format([Date],"mmm") In ("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");