maybe this question has been answered before..but after reading tons of threads that could, i couldn't find anything reliable solution to my problem...
Problem:
the selected item in the list view is not showing in my text box though it worked in my other form.
Module CODE:
Public rsUmat As New ADODB.Recordset 'Mattress Update connection
Public slcmat As String 'update mattress catcher
Form CODE:
Private Sub ListView1_DblClick()
slcmat = ListView1.SelectedItem
With rsUmat
.Open "Select * from tblMattressDetails where fldMtype like '%" & slcmat & "%'", cn, adOpenKeyset, adLockOptimistic
Me.txtMtype = rsUmat!fldMtype
Me.txtMprice = rsUmat!fldMprice
.Close
btnAdd.Enabled = False
btnUpdate.Enabled = True
btnDel.Enabled = True
End With
End Sub
Problem:
the selected item in the list view is not showing in my text box though it worked in my other form.
Module CODE:
Public rsUmat As New ADODB.Recordset 'Mattress Update connection
Public slcmat As String 'update mattress catcher
Form CODE:
Private Sub ListView1_DblClick()
slcmat = ListView1.SelectedItem
With rsUmat
.Open "Select * from tblMattressDetails where fldMtype like '%" & slcmat & "%'", cn, adOpenKeyset, adLockOptimistic
Me.txtMtype = rsUmat!fldMtype
Me.txtMprice = rsUmat!fldMprice
.Close
btnAdd.Enabled = False
btnUpdate.Enabled = True
btnDel.Enabled = True
End With
End Sub