Home  Fees/Services  Access 2010 Template  Access Tutorial  Access Download  Articles  Search  Contact  Privacy  Links

TransferText Example






Open Email Using SendObject Access Download

User Inactivity Logout VBA Code

Disable Shift Key Demo

Send Email Microsoft Access Tutorial Download (Advanced)

Sequential Counter in Query

Multi Select List Box Query Parameters

Row Level Data Security

Programming MS Access Security Alternative

Single User Inventory Calculations Download

How To Perform Multi-User Inventory Calculations

Make Dependent Combo Box Code MS Access Tutorial

Union Query Example (Simple)

Union Query (Advanced) Access Tutorial

How To Fill Fields From Combo Box

Use Global Variables as Parameters

Continuous Form Dependent Combo Box

How To Program Continuous-Continuous Master/Detail Forms

Access Bar Chart / Bar Graph

Programming Crosstab Query Example

TransferText & OutputTo Microsoft Access

DoCmd.OpenForm & OpenArgs VBA Example

Running Sum Query Method

Choose Command Dynamic SQL Order By

Access Conditional Format

Access Report Banding

Popup Form Control Method


Docmd TransferText Example Download

The DoCmd OutputTo Visual Basic method gives you the ability to send an Access object to a file on your computer.  There are several destination formats from which to choose:

  • acFormatActiveXServer

  • acFormatHTML

  • acFormatIIS

  • acFormatRTF

  • acFormatTXT

  • acFormatXLS

In this Output Specifications example we will work with the acformattxt (text) output method. We output the data contained in our inventory table named "M_Inventory".  The output destination file is called Inventory.txt and is placed in your default directory at time of running the database example - usually the 'my documents' folder.

Here is the command line used in the Click event of the button on the form:

 DoCmd.OutputTo acOutputTable, "M_Inventory", acFormatTXT, "Inventory.txt"

You can read more about the DoCmd.OutputTo specification method in our learning section docmd programming tutorial for the outputto method.

The second example contained in this Access database download is the DoCmd TransferText method.  Here we use an Export Specification defined in the export text wizard.  Microsoft makes it hard to get to the specifications.  See our DoCmd.Transfertext tutorial page for more details.  And to learn more about creating the export specifications go here: Create Export Specs

In this example we transfer the text of the M_Inventory table into a comma separated values formatted file on the hard drive.  The file will be called inventory.csv and is placed in your document and settings/my documents folder, same as the folder in the 1st example above.

The transfertext command that is used is as follows:

 DoCmd.TransferText acExportDelim, "Inventory_Specs", "M_Inventory", "Inventory.csv"

Use this link to download docmd outputto and docmd.transfertext Access examples.









A Blue Claw Software Design Template:

Loan Process Management Access Database
 










A Blue Claw Database Design Article:

Microsoft Access On The Internet
 









Blue Claw Database Design Downloadable Tutorial:
Popup Form Control Method  









Here is a randomly selected programming tutorial:

DoCmd DeleteObject
 


Microsoft Office:
MS Access 2003
Access 2007
Access 2010
Access 2013
Access 2016
Updated On 8/21/2016 12:32:27 PM

Contact Information

Copyright 2000-2016 Blue Claw Database Design

MS Access 2013, Access 2010 & Microsoft Office 2007