sir
i want if user click in combo box corresponding value should come
from pquery, mquery from access database.
but i am not getting the result i have put some code in combo_click
but when i click in text combo box to display the last value of product_id
then i am getting error
run time error 3021 kindly help me
Private Sub Combo1_Click()
Dim nm As String
Set rscombo = New Recordset
Select Case Combo1.Text
Case "Production Consumable"
rscombo.Open "select * from Pquery", con, adOpenDynamic, adLockOptimistic
MsgBox (rscombo.Fields(0))
List1.AddItem rscombo!Fields(item_code)
Case "Maintenance Consumable"
rscombo.Open "select * from mquery", con, adOpenDynamic, adLockBatchOptimistic
Case Else
rscombo.Open "select * from pquey", con, adOpenDynamic, adLockOptimistic
End Select
End Sub