Hello All,
I am trying to run this code:
Dim strIn As String
Dim rst As DAO.Recordset
Dim strSQL As String
Set rst = Me.RecordsetClone
Do Until rst.EOF
strIn = strIn & rst!ChildHSReferenceNumber & ","
rst.MoveNext
Loop
If Right(strIn, 1) = "," Then
strIn = Left(strIn, Len(strIn) - 1)
End If
strSQL = "Update HSChild Set HSChildOver6Month = 'Yes' "
strSQL = strSQL & "WHERE ChildHSReferenceNumber IN(" & strIn & ")"
CurrentDb.Execute strSQL
rst.Close
Set rst = Nothing
but I keep getting an error messages: too few parameters? what can be going wrong? many thanks for your helps...
Ty
I am trying to run this code:
Dim strIn As String
Dim rst As DAO.Recordset
Dim strSQL As String
Set rst = Me.RecordsetClone
Do Until rst.EOF
strIn = strIn & rst!ChildHSReferenceNumber & ","
rst.MoveNext
Loop
If Right(strIn, 1) = "," Then
strIn = Left(strIn, Len(strIn) - 1)
End If
strSQL = "Update HSChild Set HSChildOver6Month = 'Yes' "
strSQL = strSQL & "WHERE ChildHSReferenceNumber IN(" & strIn & ")"
CurrentDb.Execute strSQL
rst.Close
Set rst = Nothing
but I keep getting an error messages: too few parameters? what can be going wrong? many thanks for your helps...
Ty