DoCmd.OpenQuery ("Get1 Spec Revs")
DoCmd.OpenQuery ("Get2 Plant Forms")
DoCmd.OpenQuery ("Get3 More Data")
If Check89 = True Then DoCmd.OutputTo acOutputQuery, "Get4 No HSI Form",
acFormatXLS, "C:\Temp\Output.xls", True
The first 3 queries are make-table queries, and the fourth is not. All 4
queries run just fine, and I get the data that I need, however, I can't run
it a second time because the SQL erases itself in the fourth query only!!!
This is VERY frustrating because I have to constantly copy and paste the SQL
back into it. Any suggestions?
Thanks!
Jessica
Sam
--
Sam
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-queries/200601/1
SELECT More_Data.PITEM_ID AS Specification, More_Data.PITEM_REVISION_ID AS
Revision, More_Data.PCREATION_DATE AS Date_Revised, More_Data.POS_USERNAME AS
Who_revised, More_Data.INFODBA_PWORKSPACEOBJECT_POBJECT_TYPE AS Object_Type
FROM More_Data
WHERE (((More_Data.PCREATION_DATE) Between [Forms]![No HSI
PRF]![CreateStart] And [Forms]![No HSI PRF]![CreateEnd]) AND
((More_Data.INFODBA_PWORKSPACEOBJECT_POBJECT_TYPE) Like [Forms]![No HSI
PRF]![DocType] And
(More_Data.INFODBA_PWORKSPACEOBJECT_POBJECT_TYPE)<>"End_Item Revision Master"
And (More_Data.INFODBA_PWORKSPACEOBJECT_POBJECT_TYPE)<>"SalesOrder Form" And
(More_Data.INFODBA_PWORKSPACEOBJECT_POBJECT_TYPE)<>"Alloy_Item Revision
Master" And (More_Data.INFODBA_PWORKSPACEOBJECT_POBJECT_TYPE)<>"Commodity
Sales Form" And
(More_Data.INFODBA_PWORKSPACEOBJECT_POBJECT_TYPE)<>"PlantReview Form" And
(More_Data.INFODBA_PWORKSPACEOBJECT_POBJECT_TYPE)<>"Category Form") AND
(([More_Data].[PITEM_ID] & [More_Data].[PITEM_REVISION_ID]) Not In (SELECT
More_Data.PITEM_ID & More_Data.PITEM_REVISION_ID FROM More_Data WHERE
INFODBA_PWORKSPACEOBJECT_POBJECT_NAME="G1A.HSI-Plant Review")))
ORDER BY More_Data.PITEM_ID, More_Data.PITEM_REVISION_ID;
Sam
--
Anybody got any ideas?