M
Ming
We have a function to export invoice document, which adds a few lines of
invoice information to a temp table ztblOutgoingTemp, then run “INSERT INTO
ztblOutgoing1 SELECT ztblOutgoingTemp.* FROM ztblOutgoingTemp “ append query
to copy all information regarding that invoice from ztblOutgoingTemp to
ztblOutgoing1. Then delete all the information from ztblOutgoingTemp
The lines in the ztblOutgoingTemp, should like this:
TRNS
SPL
..
..
SPL
END TRNS
The Sequence of records should like this in ztblOutgoing1
TRNS
SPL
SPL
SPL
END TRNS
TRNS
SPL
SPL
ENDTRNS
TRNS
SPL
SPL
ENDTRNS
..
..
This function is called in a loop to add each invoice information based on
the user selection. We have noticed that sometimes the partial of invoice
related information for one invoice jumped to other location in
ztblOutGoing1. Such as following:
TRNS
SPL
SPL
SPL
END TRNS
TRNS
SPL
ENDTRNS
SPL
ENDTRNS
TRNS
SPL
ENDTRNS
If the function is called many times in the loop, most of time, over hundred
invoices, the records jump randomly. But sometimes, it can happen even with
6-8 invoices. We have used RS.movelast when we add each line to the
ztblOutgoingTemp. However, the order still changes sometimes. Both tables
don’t have primary key field because of the content of data. The
ztblOutgoing1 table is used for exporting data with “DoCmd.TransferTextâ€.
Any idea how to avoid this issue to make sure they are in the correct
sequence?
invoice information to a temp table ztblOutgoingTemp, then run “INSERT INTO
ztblOutgoing1 SELECT ztblOutgoingTemp.* FROM ztblOutgoingTemp “ append query
to copy all information regarding that invoice from ztblOutgoingTemp to
ztblOutgoing1. Then delete all the information from ztblOutgoingTemp
The lines in the ztblOutgoingTemp, should like this:
TRNS
SPL
..
..
SPL
END TRNS
The Sequence of records should like this in ztblOutgoing1
TRNS
SPL
SPL
SPL
END TRNS
TRNS
SPL
SPL
ENDTRNS
TRNS
SPL
SPL
ENDTRNS
..
..
This function is called in a loop to add each invoice information based on
the user selection. We have noticed that sometimes the partial of invoice
related information for one invoice jumped to other location in
ztblOutGoing1. Such as following:
TRNS
SPL
SPL
SPL
END TRNS
TRNS
SPL
ENDTRNS
SPL
ENDTRNS
TRNS
SPL
ENDTRNS
If the function is called many times in the loop, most of time, over hundred
invoices, the records jump randomly. But sometimes, it can happen even with
6-8 invoices. We have used RS.movelast when we add each line to the
ztblOutgoingTemp. However, the order still changes sometimes. Both tables
don’t have primary key field because of the content of data. The
ztblOutgoing1 table is used for exporting data with “DoCmd.TransferTextâ€.
Any idea how to avoid this issue to make sure they are in the correct
sequence?