The Microsoft Jt database engine can not find
tblJobSites, error #3078. That's what I get when
executing this code...
Private Sub Command1_Click( )
Dim MyWorkspace As Workspace
Set MyWorkspace = DBEngine.Worksp aces(0)
Dim MyDB As Database
Dim MyQueryDef As QueryDef, MyRecSet As Recordset
Dim MyPeriod As String, MyRand As Double
Set MyDB = MyWorkspace.Dat abases(0)
Set MyQueryDef = MyDB.CreateQuer yDef("")
With MyQueryDef
' Create temporary QueryDef.
.SQL = "SELECT [Period] FROM tblJobsites WHERE [Period]='M'"
Set MyRecSet = .OpenRecordset( )
MyRecSet.MoveFi rst
End With
Debug reports the problematic line ...
Set MyRecSet = .OpenRecordset( )
What have I done wrong here?
(frmProgrammerO nly, Command1 button click, deadpest.mdb)
tblJobSites, error #3078. That's what I get when
executing this code...
Private Sub Command1_Click( )
Dim MyWorkspace As Workspace
Set MyWorkspace = DBEngine.Worksp aces(0)
Dim MyDB As Database
Dim MyQueryDef As QueryDef, MyRecSet As Recordset
Dim MyPeriod As String, MyRand As Double
Set MyDB = MyWorkspace.Dat abases(0)
Set MyQueryDef = MyDB.CreateQuer yDef("")
With MyQueryDef
' Create temporary QueryDef.
.SQL = "SELECT [Period] FROM tblJobsites WHERE [Period]='M'"
Set MyRecSet = .OpenRecordset( )
MyRecSet.MoveFi rst
End With
Debug reports the problematic line ...
Set MyRecSet = .OpenRecordset( )
What have I done wrong here?
(frmProgrammerO nly, Command1 button click, deadpest.mdb)
Comment