J
Jason
Hi,
Could someone help me to adjust the following code to check if the query
exists, if so then it should not try to create it.
Function CreateSPT(SPTQueryName As String, CmdString As String)
Dim db As dao.Database
Dim qdf As dao.QueryDef
Set db = DBEngine.Workspaces(0).Databases(0)
Set qdf = db.CreateQueryDef(SPTQueryName)
With qdf
.Connect = ConnString(False)
.SQL = CmdString
.Close
End With
End Function
Could someone help me to adjust the following code to check if the query
exists, if so then it should not try to create it.
Function CreateSPT(SPTQueryName As String, CmdString As String)
Dim db As dao.Database
Dim qdf As dao.QueryDef
Set db = DBEngine.Workspaces(0).Databases(0)
Set qdf = db.CreateQueryDef(SPTQueryName)
With qdf
.Connect = ConnString(False)
.SQL = CmdString
.Close
End With
End Function