Can anybody tell me.How should i get value on the basis of combo box.i simple want when user click one of the productname from the combo box other corresponding fields from the database should come in the text box of the form.Here is the code what i have written.kindly help me.any help would be greately appreciated.right
now i am getting runtime error 3709.
Private Sub Combo3_Click()
If Combo3.Text <> "" Then
Set rs = New ADODB.Recordset
rs.Open "select materials.unit from Materials Where Materials.productname=" & Combo3.Text & ", con,adopendynamic,adlockoptimistic"
TxtUnit.Text = rs!Unit
End If
End Sub