Привожу фрагмент кода:
- Код: Выделить всё
Dim wrkJet As Workspace
Dim rstTemp As Recordset
Dim myBase As Database
Dim qryTemp As QueryDef
Private Sub Form_Load()
Set wrkJet = CreateWorkspace("", "Admin", "", dbUseJet)
Set myBase = wrkJet.OpenDatabase(strPath)
Set qryTemp = myBase.CreateQueryDef("", _
"SELECT Classes.ClasID, Classes.Date_1 " & _
"From Classes " & _
"WHERE (((Classes.Status)=True))")
Set rstTemp = qryTemp.OpenRecordset
Label1.Caption = rstTemp.RecordCount
End Sub
Спасибо всем