'Access数据库名---lcjh.mdb '数据表名----cp1 '在字段xh中查找序号0100,找到后读取第2列的字符赋给变量jian Dim c As New ADODB.Connection Dim R As ADODB.Recordset Dim jian As String c.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & _ App.Path & "\lcjh.mdbersist Security Info=False" c.CursorLocation = adUseClient c.Open Set R = c.Execute("Select * from cp1 where xh='" & "0100" & "'") If R.RecordCount > 0 Then jian = R.Fields(1).Value End If R.Close c.Close Set c = Nothing Set R = Nothing End Sub '我用VB6.0开发了几个AutoCAD参数化绘图的程序,还有从Excel中读取数据画图的程序,如需要帮忙或合作的话,请联系。lqh0601@jy-bearing.com