adam.greer
Registered User.
- Local time
- Today, 04:08
- Joined
- Apr 27, 2006
- Messages
- 43
Hi Guys
I've been searching for a while and have made several changes to my code but I seem to go from one error to the next, and this last one has got me.
I receive the 'Run Time Error 3141'
The SELECT statement includes a reserved word or an arguement name that is mispelled or missing.
The SQL is copied from a query that works no problem.
Any ideas guys?
I've been searching for a while and have made several changes to my code but I seem to go from one error to the next, and this last one has got me.
Code:
Dim myRec As DAO.Recordset
Dim TrackN As String
Dim strSQL As String
strSQL = "SELECT Count(PlaylistDetails.PLaylistDetailsID) AS NewTrackNum" & _
"FROM PlaylistDetails" & _
"WHERE PlaylistDetails.PlaylistID =[Forms]![Playlists]![PlaylistID]"
Set myRec = CurrentDb.OpenRecordset(strSQL)
TrackN = strSQL + 1
Form_PlaylistsSubForm.TrackNum = TrackN
I receive the 'Run Time Error 3141'
The SELECT statement includes a reserved word or an arguement name that is mispelled or missing.
The SQL is copied from a query that works no problem.
Any ideas guys?
Last edited: