mikewood1980
Registered User.
- Local time
- Today, 15:32
- Joined
- May 14, 2008
- Messages
- 45
Hi
When executing the following SQL statement in VBA...
I get the following error...
Error 3061 - Too few parameters. Expected 1.
This occurs on the line:
If anyone can help that would be great (I've not really used SQL statements that much before so I am a bit of a novice!)
Thanks in advance
Mike Wood
When executing the following SQL statement in VBA...
Code:
Private Function createAdverseDeviationsString(strTestID As String) As String
Dim dbcurr As Database
Set dbcurr = DBEngine.Workspaces(0).Databases(0)
Dim sQuery As String
sQuery = "select * from tblAdverseDeviations where ((tblAdverseDeviations.chrTestID)=" & strTestID & ")"
Dim rsADTable As Recordset
Set rsADTable = dbcurr.OpenRecordset(sQuery)
Dim testFound As Boolean
Dim count As Integer
count = 0
...etc
Error 3061 - Too few parameters. Expected 1.
This occurs on the line:
Code:
Set rsADTable = dbcurr.OpenRecordset(sQuery)
If anyone can help that would be great (I've not really used SQL statements that much before so I am a bit of a novice!)
Thanks in advance
Mike Wood