請問要知道資料表格的紀錄筆數要如何作?
Private objConn As ADODB.Connection '
Private objRec As ADODB.Recordset '
Private Sub Command4_Click() '
gstrConn_Test = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\A.mdb"
Set objConn = New ADODB.Connection
objConn.Open gstrConn_Test
Dim strSQL As String
strSQL = "SELECT [訂單編號], 訂貨日, 品名, 數量, 交貨日 FROM 訂單 "
Set objRec = objConn.Execute(strSQL)
MsgBox objRec.Fields(0) <====可正確顯示
MsgBox objRec.RecordCount <===顯示結果為 -1,但應該有4筆記錄才對
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^?????
End Sub