I am using a macro to export a table in a Microsoft Access database to a csv file in order to import into a mysql database. I ended up using a batchfile that would place a marker in the text file before the exporting took place, and then place everything after the last marker into a new file. This works fine, except for the fact that access does not append, but will recreate the file each time, so it is impossible to use any kind of marker.
Is there any way, using access or batch files or whatever, to either a) force access to append to a file, or to place a marker of its own, or b) export to a different file each time, possibly the filename being a variable such as the date, or c) overcome this behavior with outside manipulation
Instead of using a macro to export the table you could simply create some code to open the file, and append the data to it.
How to use
Simply copy the code to a VBA module in your application and call it like this:
Code
Note that it’s not perfect and you may have to adapt the code to reflect how you want the data to be formatted, but the defaults should be fine in most cases.