Dim rst As Recordset
Dim SQL As String
Dim qcount As Integer
Dim q As Integer
Dim quan As Integer
Dim mlast As Boolean
Set conn = New ADODB.Connection
Set rs = New ADODB.Recordset
ConnStr = "Provider=Microsoft.Jet.OLEDB.3.51;" & _
       "Data Source=C:\My Documents\visual\Database.mdb"
  conn.Open ConnStr

Set cmd.ActiveConnection = conn

SQL = "select count(quantity) as q from client_out where DATE=#" & MBox1.Text & "# "
cmd.CommandText = SQL
Set rs = cmd.Execute

全站熱搜

vbqa 發表在 痞客邦 留言(10) 人氣()