You have several things going amiss here.
When running a SELECT query, you need to use the Open method of the recordset object. You do not use the connection object.
Also, for your own benefit, use variables that mean something.
VB Code:
'by looking at the code I can figure out what is going on
'but, this is not a good coding practice to get into
Dim p As String
Try this
VB Code:
Private Sub Command1_Click()
Dim objConn As ADODB.Connection
Set objConn = New ADODB.Connection
Dim objRS As ADODB.Recordset
Set objRS = New ADODB.Recordset
objConn.Open ("Provider=Microsoft.Jet.OLEDB.4.0;Data source=c:\database\DB.mdb;Persist Security Info=False")
Dim sSQL As String
sSQL = "select article from product where pname = '" & Combo1.Text & "' "
'NOTE: Strings must be encapsulated in single quotes
objRS.Open sSQL, objConn
Text1.Text = objRS.Fields.Item("article").Value
objRS.Close
Set objRS = Nothing
End Sub