Private Sub ListDR() '刷新外径,和弯头半径
If Trim(ComboBox1.Text) = "" Then '从COMBOBOX1获得弯头的公称直径描述
TextBox1.Text = ""
TextBox3.Text = ""
Exit Sub
End If
Dim strCon As String, strSel As String
strCon = "rovider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\temp.mdbersist Security Info=False" '弯头的详细尺寸参数列在temp.mdb内
strSel = "select * from Bellows where DN='" & Trim(ComboBox1.Text) & "'" '获得所选规格的记录的select语句
Dim rs As New ADODB.Recordset
rs.LockType = adLockReadOnly
rs.Open strSel, strCon
If rs.BOF = True And rs.EOF = True Then '空记录
rs.Close
TextBox1.Text = ""
TextBox3.Text = ""
Exit Sub
End If
If OptionButton5.Value = True Then
TextBox1.Text = CStr(rs("A")) 'A系列的直径
Else
TextBox1.Text = CStr(rs("B")) 'B系列的直径
End If
TextBox3.Text = CStr(rs(strRType)) '弯曲中心半径
rs.Close
End Sub