How to append new records to the end of table

M

Ming

Is there a way to append the records to the end of table in Access? The table
has no primary key field.
 
M

Ming

Jerry,

Our application is using append query to append the new records to a table
and use Docmd.TranferText to export data from that table to a excel file. The
order has been changed from time to time in the table, esp, larger amount
data has been added with append query. It looks like we have to give up our
current export method --DoCmd.TransferText acExportDelim with no other
choices :-(.

Thank you so much for your advice. I will write each line to excel file, then.


Software Developer
 
J

John Vinson

Is there a way to append the records to the end of table in Access? The table
has no primary key field.

No.

A table is an unordered heap of data. There is no meaningful "end of
the table". If you want to see records in a particular order, you must
use a Query sorting the records by the value in a field (or fields).

John W. Vinson[MVP]
 
J

Jerry Whittle

Instead of exporting a table to Excel, export a query instead. You can sort
the data in a query. Just make sure that you have a field that can be used to
put the data into the desired order.
 
M

Ming

Jerry and John,

I added a line number to the table and sort data by LineNumber, then export
it. I have tested exporting about 1000 invoices at a time. The result is good
so far.

Once again, thank you so much.


Software Developer
 
M

Ming

Jerry,

First, I have tried use "DoCmd.TransferText acExportDelim, "mySpec",
"myQry", "c:\invoices.txt". It did not work out for me since I keep getting
error "3011". It looks like I can not use my current spec. I don't know why,
output result is the same as before.

Then I tried use "select... into" query to select all field ecept the
LineNumber field from that table but order by linenumber into a temp table.
It was ok when I exported about 250 invoices, then 1024 invoices. But, when I
tried to export about 13000 invoices this time. The records jumped again.
 
Top