0

can anybody help me .if not help at least suggestion.i will remain
grateful to all of you.any help would be greately appreciated.
list.zip

i have taken all the information of listbox1 in strreq.which is a string
type variable.since it is a string type variable. That is why i have
split strreq .and put testvalue(0) in strlistrequest variable.now i have used that variable in resultset.but i don't know how should
i store list box2 data .so that i could able to store both corresponding information in a table.here is the code what i have
written.

Private Sub Command7_Click()
Dim strSQL As String
If List1.ListIndex >= 0 Then
strReq = List1.List(List1.ListIndex)
testValue = Split(strReq, vbTab)
strlistrequest = testValue(0)
Set rs = New ADODB.Recordset
strSQL = "SELECT * FROM [Mrmastertable]"
rs.Open strSQL, con, adOpenDynamic, adLockOptimistic
If rs.State = adStateOpen Then
rs.AddNew
rs.Fields("req_no") = IIf(IsNull(strlistrequest), "", strlistrequest)
rs.Fields("qty") = IIf(IsNull(Val(strQty), " ", strQty))
rs.Fields("unit") = IIf(IsNull(strUnit), "", strUnit)
rs.Fields("productname") = IIf(IsNull(strProduct), " ", strProduct)
rs.Update
MsgBox "data saved", vbInformation, Me.Name
rs.Close
Set rs = Nothing
End If
End If
End Sub

2
Contributors
2
Replies
3
Views
8 Years
Discussion Span
Last Post by firoz.raj
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.