D
David French
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, ""
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, ""