4 replies
by dklippert
Open the Table/Query and choose File>Export.
Choose one on the Text files, CSV etc.
The previous answer is correct, other than you said you did not want to export the entire table. To export part of a table, open the table, select the records you want to export and then do the File-Export. Select Text Files as the type and give the export a filename with .csv as an ending.
Don
by glen_mcleod
Following on both of the previous answers, you can also create a query that retreives the correct records, then export that to your comma delimited file.
Glen
by bob sellman
If you want to end up doing this using a form (with VBA code in back of a button), you can do the following:
1. Create a query with appropriate parameters (which could use values on the form that will have the command button calling the output procedure).
2. Manually export the data through the File, SaveAs/Export functions as discussed in the other answers. As you go through the export wizard, be sure to click on Advanced at some point to fully define the export as you need it and, most important, save the export definition.
3. Continue saving until you've got the export creating the external file exactly as you need it. Each time you try to do the export, as soon as you get to the wizard, click on advanced and load your export definition file. Refine the export definition and then be sure to save the corrected definition.
4. Now you can set up the code behind a command button on your form. Use the DoCmd.OutputTo function. In that function you will reference the query that selects the data of interest, set up your path/destination file name, and list the name of the export definition file you created above.
Works like a charm to export in a variety of formats, including comma-delimited formats.
This discussion is closed to new replies.
Trending Web Development posts
Sort by Trending