Access VBA DoCmd.TransferText Method

This Access VBA tutorial explains how to import and export Access Objects to text using DoCmd.TransferText Method. You may also want to read Access VBA Export all Queries to Excel Access VBA import txt using DoCmd.TransferText Method Syntax of  DoCmd.TransferText Method DoCmd.TransferText(TransferType, SpecificationName, TableName, FileName, HasFieldNames, HTMLTableName, CodePage) Name Required/Optional Data Type Description TransferType Optional AcTextTransferType T...
Read More

Microsoft Access VBA Export all Query to Text File

This Access tutorial explains how to use Access VBA to export all Query to Text file. You may also want to read: Microsoft Access Export all Queries to Excel Access VBA DoCmd.TransferText Method Export Access Objects to Text (non VBA) There are two kinds of export that we can use to export an Access object to Text file. Assume that we want to export Query1 to Text. Right click on the Query > Export > Text File   This page has a check box Export data with format...
Read More

Microsoft Access Export all Queries to Excel

This Access tutorial explains how to export all Queries to Excel. You may also want to read: Access VBA auto generate mass report by group to Excel Microsoft Access Export all Queries to Excel Assume that you have created three Queries in Access database, all you want to export them to Excel.   Press ALT+F11 > insert a Module > paste the below code Public Sub export_Excel()   Dim db As DAO.Database   Dim qdf As DAO.QueryDef   Set db = CurrentDb()   For Each ...
Read More

Access VBA DoCmd.TransferSpreadSheet Method

This Access tutorial explains how to use DoCmd.TransferSpreadSheet Method to export and import files. You may also want to read: Access VBA DoCmd.OutputTo Method Access VBA auto generate mass report by group to Excel Access Export all Queries to Excel Syntax of DoCmd.TransferSpreadSheet Method TransferSpreadsheet(TransferType, SpreadsheetType, TableName, FileName, HasFieldNames, Range, UseOA) Name Required/Optional Description TransferType Optional The type of transfe...
Read More

Access VBA auto generate mass report by group to Excel

This Access tutorial explains how to auto generate mass report by group, for example, auto generate reports by different department and then export to Excel. You may also want to read: Excel VBA filter value then copy data to new worksheet Access VBA auto generate mass report by group to Excel Assume that we have a staff list of 1000 employees in 20 departments, our goal is to export 20 staff list to Excel, one department for each staff list. There are several ways to achieve this task: ...
Read More

Send Email in Access VBA using CDO SendObject OlMailItem

This tutorial explains how to send email in Access VBA using CDO, SendObject and olMailItem Send Email in Access VBA using CDO, SendObject, OlMailItem There are mainly two methods of sending email in Access VBA. The first method is to use CDO Object, another is to use SendObject Method, I will explain each method in the below sections. Send Email in Access VBA using SendObject Method To send email using SendObject Method is simple, because it does not require SMTP sever address and port numb...
Read More