View Single Post
  #3 (permalink)  
Old November 10th, 2006, 05:03 PM
stealthdevil stealthdevil is offline
Friend of Wrox
 
Join Date: May 2006
Location: Jonesboro, AR, USA.
Posts: 144
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I think my problem may lie in this append query.
The first query deletes all records from the reverse table. Then the second query copies all the records from the sequence tbl(that the module just created) into the reverse table. When this query runs it acts like it doesn't get all the way through the records. It should start with the last record from sequence table, but it doesn't always and I don't know why. There are 653 records in the table.

Code:
DoCmd.RunSQL ("delete * from tbl_os_reverse")
DoCmd.OpenQuery "qry_append_reverse"
Code:
INSERT INTO tbl_os_reverse ( LOGO, [YEAR], OCC, [NEW SEQ], OVERSIZED, CELLO, [PLAN QTY], [USAGE], [SIZE], [WHLSL PACK], [SALES DATE], [MARKETING NUMBER], [WHLSL AGIN], [WHLSL AGIN DESC], HOLIDAY, PLG, [PLG DESCRIPTION], [SORT KEY] )
SELECT tbl_os_seq.LOGO, tbl_os_seq.YEAR, tbl_os_seq.OCC, tbl_os_seq.[NEW SEQ], tbl_os_seq.OVERSIZED, tbl_os_seq.CELLO, tbl_os_seq.[PLAN QTY], tbl_os_seq.USAGE, tbl_os_seq.SIZE, tbl_os_seq.[WHLSL PACK], tbl_os_seq.[SALES DATE], tbl_os_seq.[MARKETING NUMBER], tbl_os_seq.[WHLSL AGIN], tbl_os_seq.[WHLSL AGIN DESC], tbl_os_seq.HOLIDAY, tbl_os_seq.PLG, tbl_os_seq.[PLG DESCRIPTION], tbl_os_seq.[SORT KEY]
FROM tbl_os_seq
ORDER BY tbl_os_seq.[SORT KEY] DESC;

Reply With Quote