This procedure correctly prints the record count. If I change the Debug.print .recordcount to Debug.print .quantity, I do not get the quantity, but an error. How do I get the content of the quantity field to print?
Private Sub Command0_Click()
Dim db As Database
Dim strSQL As String
Dim qdfTemp As QueryDef
Dim rst As Recordset
Set db = CurrentDb
strSQL = “SELECT * FROM [Order Details]”
Set qdfTemp = db.CreateQueryDef(“”, strSQL)
Set rst = qdfTemp.OpenRecordset(dbOpenDynaset)
With rst
.MoveLast
Debug.Print .RecordCount
.Close
End With
End Sub