回复 9楼 wp231957
VB系统.zip
(332.71 KB)
Option Explicit Public conn As New ADODB.Connection Public AdoRs As New ADODB.Recordset Public OpenStr As String Public strSQL As String Private Sub Form_Load() OpenStr = "Provider=Microsoft.Jet.OLEDB.4.0;" & "Data Source=" & App.Path & "\sjk.mdb;" & "Jet OLEDB:Database Password=" conn.Open OpenStr strSQL = "select * from ygxxb " AdoRs.CursorLocation = adUseClient AdoRs.Open strSQL, conn, 1, 1 '打开记录集 Set DataGrid1.DataSource = AdoRs End Sub Private Sub Combo1_Click() AdoRs.Close strSQL = "select * from ygxxb where 所属车间='" & Combo1.Text & "'" AdoRs.Open strSQL, conn, 1, 1 Set DataGrid3.DataSource = AdoRs End Sub