psycoperl
Active Member
- Joined
- Oct 23, 2007
- Messages
- 339
- Office Version
- 365
- 2016
- Platform
- Windows
- MacOS
- Web
I am getting the compile error on the rsStudentSearch.Open = "Select * From tblStudent Where stuID =" & rsReport![STUDENTID] line in the section below. It highlights the ![STUDENTID] section of the line.
I am not sure why this is throwing the error.
Thanks
I am not sure why this is throwing the error.
Thanks
Code:
Dim rsStudentSearch As ADODB.Recordset
Set rsStudentSearch = New ADODB.Recordset
rsStudentSearch.ActiveConnection = CurrentProject.Connection
rsStudentSearch.Open = "Select * From tblStudent Where stuID =" & rsReport![STUDENTID]
rsStudentSearch.CursorType = adOpenStatic
rsStudentSearch.LockType = adLockPessimistic