DonkeyKong
Registered User.
- Local time
- Today, 07:50
- Joined
- Jan 24, 2013
- Messages
- 61
I'm trying to turn an access query into VBA code and was wondering if I could get some pointers on what I'm doing wrong like things I should change and things I shouldn't.
The query:
The code I have for what I want to do with this portion:
The query:
Code:
SELECT Suspense.CUSIP, Suspense.Account, Suspense.[Registration Code], Suspense.[Payable Date], Suspense.Balance
FROM Suspense
WHERE (((Suspense.CUSIP) Like "0*"))
ORDER BY Suspense.CUSIP;
The code I have for what I want to do with this portion:
Code:
strSQL1 = "SELECT [CUSIP], [Account], [Registration Code], " & _
"[Payable Date], [Balance] & FROM Suspense " & _
"WHERE(([CUSIP] Like '0*'))ORDER BY [CUSIP]"
CurrentDb.Execute strSQL, dbFailOnError
strSQL = "INSERT INTO [SuspenseTemp] SELECT * FROM " & strSQL1 & ""
CurrentDb.Execute strSQL, dbFailOnError