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

I'm not sure I fully understand the problemo

Did you download attachment.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.