Advertisement
Advertisement
| 06.21.2008 at 09:00AM PDT, ID: 23504695 |
|
[x]
Attachment Details
|
||
|
[x]
The Solution Rating System
|
||
With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.
Your Input Matters If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support. Thank you! |
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: |
Sub Get_Bank_ACH_Data_V2()
' Get Bank ACH Data
Dim MyConnect As String
Dim MyRecordset As ADODB.Recordset
Dim MySQL As String
Dim BankTable As String
Dim DateFrom As Date
' Declare connection String
MyConnect = "Provider=Microsoft.ACE.OLEDB.12.0;" & _
"Data Source= C:\Integration\JHB_CPA_Banking.accdb"
' Declare Bank Table
BankTable = "TABC_Chase"
' Declare DateFrom=#03/28/2008#
' SQL Statement
MySQL = "SELECT Bank_Number, Record, Trans_Date, Reference, Amount" & _
" FROM TABC_Chase" & _
" Where Trans_Date > #3/28/2008#"
'Step 4: Instantiate and Specify your Recordset
Set MyRecordset = New ADODB.Recordset
MyRecordset.Open MySQL, MyConnect, adOpenStatic, adLockReadOnly
'Step 4: Find first empty cell
Sheets("AppendData").Select
ACH_Data = "A" & ActiveSheet.Cells.SpecialCells(xlCellTypeLastCell).Row + 1
'Step 5: Copy the Recordset to First Empty Row
ActiveSheet.Range(ACH_Data).CopyFromRecordset MyRecordset
End Sub
|