hello I get the RUNTIME error during the following function :
it looks like my db is set to nothing
Code:
Private Sub Form_Load()
If TableExists("tmpJobTime") Then
DoCmd.DeleteObject acTable, "tmpJobTime"
Else
DoCmd.OpenStoredProcedure "spJobTime"
End If
End Sub
Public Function TableExists(sTable As String) As Boolean
Dim db As database
Dim tbl As TableDef
Set db = CurrentDb()
TableExists = False
For Each tbl In db.TableDefs
If tbl.Name = sTable Then
TableExists = True
Next tbl
End Function