C
Carlgardner
I am trying to get access 2003 to accept a final DoCmd.RunSQL at the end of
this
Private Sub Form_Load()
DoCmd.SetWarnings False
'Build the 4 new tables
DoCmd.RunSQL "SELECT DISTINCT Lot1 AS Lot INTO LOT1 FROM BATCH"
DoCmd.RunSQL "SELECT DISTINCT Lot2 AS Lot INTO LOT2 FROM BATCH"
DoCmd.RunSQL "SELECT DISTINCT LotC AS Lot INTO LotC FROM BATCH"
DoCmd.RunSQL "SELECT DISTINCT LotD AS Lot INTO LotD FROM BATCH"
'Build the final table (Result of the union) for the CBO in frm_Select Drug
by LOT#
THIS is the command I cannot get it to accept: I believe it is formatting I
cannot do. Novice.
SELECT Lot INTO ALLLOT
FROM [Select Lot from Lot1 Union Select Lot from Lot2 Union Select Lot from
LotC Union Select Lot from LotD].
AS [%$##@_Alias];
this
Private Sub Form_Load()
DoCmd.SetWarnings False
'Build the 4 new tables
DoCmd.RunSQL "SELECT DISTINCT Lot1 AS Lot INTO LOT1 FROM BATCH"
DoCmd.RunSQL "SELECT DISTINCT Lot2 AS Lot INTO LOT2 FROM BATCH"
DoCmd.RunSQL "SELECT DISTINCT LotC AS Lot INTO LotC FROM BATCH"
DoCmd.RunSQL "SELECT DISTINCT LotD AS Lot INTO LotD FROM BATCH"
'Build the final table (Result of the union) for the CBO in frm_Select Drug
by LOT#
THIS is the command I cannot get it to accept: I believe it is formatting I
cannot do. Novice.
SELECT Lot INTO ALLLOT
FROM [Select Lot from Lot1 Union Select Lot from Lot2 Union Select Lot from
LotC Union Select Lot from LotD].
AS [%$##@_Alias];