My apologies.
That was the wrong one.
Here is the macro I'm using CONVERTED to VBA.
Function mcrAllInOne()
On Error GoTo mcrAllInOne_Err
DoCmd.TransferSpreadsheet acImport, 8, "tblHOP",
"\\Poughkeepsie\mis\DBSi\AP Bank Rec\APBR HOP.xls", True, "a1:d3000"
Beep
MsgBox "The HO Penn file was imported.", vbInformation, ""
DoCmd.TransferText acExportFixed, "HopTest Export Specification",
"qryHOP", "\\Poughkeepsie\Keybank\APBR HOP.txt", False, ""
DoCmd.OpenReport "rptHOPsummary", acViewPreview, "", ""
DoCmd.OutputTo , "", "RichTextFormat(*.rtf)", "\\Poughkeepsie\Keybank\HO
Penn AP Summary.rtf", False, ""
DoCmd.Close acReport, "rptHOPsummary"
Beep
MsgBox "The files have been created.", vbInformation, ""
DoCmd.TransferSpreadsheet acImport, 8, "tblPR",
"\\Poughkeepsie\mis\DBSi\AP Bank Rec\APBR PR.xls", True, "a1:d3000"
Beep
MsgBox "The Penn Rents file was imported.", vbInformation, ""
DoCmd.TransferText acExportFixed, "HopTest Export Specification",
"qryPR", "\\Poughkeepsie\Keybank\APBR PR.txt", False, ""
DoCmd.OpenReport "rptPRsummary", acViewPreview, "", ""
DoCmd.OutputTo , "", "RichTextFormat(*.rtf)",
"\\Poughkeepsie\Keybank\Penn Rents AP Summary.rtf", False, ""
DoCmd.Close acReport, "rptPRsummary"
Beep
MsgBox "The files have been created.", vbInformation, ""
DoCmd.TransferText acExportFixed, "Payroll Export Specification",
"qryHOPennEOMPayroll", "\\Poughkeepsie\Keybank\HO Penn Payroll.txt", False,
""
DoCmd.OpenReport "rptHOPennEOMPayrollSummary", acViewPreview, "", "",
acNormal
DoCmd.OutputTo , "", "RichTextFormat(*.rtf)", "\\Poughkeepsie\Keybank\HO
Penn EOM PR Summary.rtf", False, "", 0
DoCmd.Close , ""
Beep
MsgBox "The HO Penn files have been created.", vbInformation, ""
DoCmd.TransferText acExportFixed, "Payroll Export Specification",
"qryPennRentsEOMPayroll", "\\Poughkeepsie\Keybank\Penn Rents Payroll.txt",
False, ""
DoCmd.OpenReport "rptPennRentsEOMPayrollSummary", acViewPreview, "", "",
acNormal
DoCmd.OutputTo , "", "RichTextFormat(*.rtf)",
"\\Poughkeepsie\Keybank\Penn Rents EOM Summary Report.rtf", False, "", 0
DoCmd.Close , ""
Beep
MsgBox "The Penn Rents files have been created.", vbInformation, ""
mcrAllInOne_Exit:
Exit Function
"Steve Schapel" <(E-Mail Removed)> wrote in message
news:eLqic%(E-Mail Removed)...
> David,
>
> First of all, this is not a macro. It is a VBA procedure. But in any
> case, I can't see how this code is creating 4 text files?
>
> --
> Steve Schapel, Microsoft Access MVP
>
>
> David French wrote:
> > I have a macro that I have pasted in the VB code for below.
> > This is for a file transfer to our bank.
> > The macro ends up creating 4 separate files which after I created this
macro
> > the bank informed me that their systems see all of our data as one big
file.
> > So now what I do is MANUALLY copy and paste into one file that I send to
the
> > bank.
> > How can I change what I'm doing to I CREATE 1 file instead of 4?
> > The files I'm referring to are the .TXT files.
> > It would be nice to give them one .RTF file as well but I'm not going to
be
> > greedy.
> >
> > Thanks,
> > Dave French
> >
> >
> > Function mcrHOP()
> > On Error GoTo mcrHOP_Err
> >
> > DoCmd.TransferSpreadsheet acImport, 8, "tblHOP",
> > "\\Poughkeepsie\mis\DBSi\AP Bank Rec\APBR HOP.xls", True, "a1:d3000"
> > Beep
> > MsgBox "The file was imported.", vbInformation, ""
> > qryHOP1 = "SELECT Count(REPORTS_V_CHK_VW_INFO.[CHECKVIEWCHK#]) AS
> > [CountOfCHECKVIEWCHK#], Sum(REPORTS_V_CHK_VW_INFO.CHECKVIEWNETPAYAMT) AS
> > SumOfCHECKVIEWNETPAYAMT"" FROM REPORTS_V_CHK_VW_INFO WHERE
> > (((IIf(([CHECKVIEWVOIDCHIND]=""N""),0,1))=0) AND
> > ((REPORTS_V_CHK_VW_INFO.CHECKVIEWCHKVCHRCD)=""C"") AND
> > ((REPORTS_V_CHK_VW_INFO.COMPANYCODE)=""8YT"") AND
> > ((Month([CHECKVIEWPAYDATE]))=[Enter Numeric Month]) AND
> > ((Year([CHECKVIEWPAYDATE]))=[Enter Year])) OR
> > (((IIf(([CHECKVIEWVOIDCHIND]=""N""),0,1))=0) AND
> > ((REPORTS_V_CHK_VW_INFO.CHECKVIEWCHKVCHRCD)=""C"") AND
> > ((REPORTS_V_CHK_VW_INFO.COMPANYCODE)=""8YS"") AND
> > ((Month([CHECKVIEWPAYDATE]))=[Enter Numeric Month]) AND
> > ((Year([CHECKVIEWPAYDATE]))=[Enter Year]));"
> >
> > DoCmd.TransferText acExportFixed, "HopTest Export Specification",
> > qryHOP1, "\\Poughkeepsie\Keybank\APBR HOP.txt", False, ""
> > DoCmd.OpenReport "rptHOPsummary", acViewPreview, "", ""
> > DoCmd.OutputTo acOutputReport, "", "RichTextFormat(*.rtf)",
> > "\\Poughkeepsie\Keybank\HO Penn AP Summary.rtf", False, ""
> > DoCmd.Close acReport, "rptHOPsummary"
> > Beep
> > MsgBox "The files have been created.", vbInformation, ""
> >
> >
> >
> >