slamet Harto
10-22-2011, 06:24 PM
Hi there
Hope you are doing good.
Do me a favor, if I want to update some records on all selected list in a listbox
With the following syntax, I get stuck with error message - Too few parameter
Private Sub CmdUpdate_Click()
Dim iloop As Long
Call Connect 'sub function on connection string
For iloop = 1 To MyList.ListCount
If MyList.Selected(iloop - 1) = True Then
cn.Execute "Update tblPPDC set DateRcvd= Trim(TextBox1.Text) where LRF_No='" & Trim(Me.MyList.List(Me.MyList.ListIndex, 0)) & "'", , adCmdText
Me.MyList.ListIndex = Me.MyList.ListIndex - 1
MyList.Selected(iloop - 1) = False
End If
Next
cn.Close
Set cn = Nothing
End Sub
Any kind of suggestion, would be much appreciated it
Harto
Hope you are doing good.
Do me a favor, if I want to update some records on all selected list in a listbox
With the following syntax, I get stuck with error message - Too few parameter
Private Sub CmdUpdate_Click()
Dim iloop As Long
Call Connect 'sub function on connection string
For iloop = 1 To MyList.ListCount
If MyList.Selected(iloop - 1) = True Then
cn.Execute "Update tblPPDC set DateRcvd= Trim(TextBox1.Text) where LRF_No='" & Trim(Me.MyList.List(Me.MyList.ListIndex, 0)) & "'", , adCmdText
Me.MyList.ListIndex = Me.MyList.ListIndex - 1
MyList.Selected(iloop - 1) = False
End If
Next
cn.Close
Set cn = Nothing
End Sub
Any kind of suggestion, would be much appreciated it
Harto