S
sam.alame
Hello,
I have the following code that runs from an external database to
change the SQL of a query. The query I'm modifying is originally
hidden. After the SQL is changed, the query becomes unhidden for some
reason. Is there any way around this? If not, how do I remotely hide
the queries after modifying them?
Function ModififyTerr(DBName As String)
Dim DB As Database, qdf As QueryDef
Set DB = DBEngine.Workspaces(0).OpenDatabase(DBName)
Set qdf = DB.QueryDefs("TblName")
qdf.SQL = "SELECT MSysObjects.Name FROM MSysObjects WHERE
(((MSysObjects.Flags) In (0,16,128)) AND ((MSysObjects.Type)=1 Or
(MSysObjects.Type)=5));"
qdf.Close
End Function
Thanks you,
Sam
I have the following code that runs from an external database to
change the SQL of a query. The query I'm modifying is originally
hidden. After the SQL is changed, the query becomes unhidden for some
reason. Is there any way around this? If not, how do I remotely hide
the queries after modifying them?
Function ModififyTerr(DBName As String)
Dim DB As Database, qdf As QueryDef
Set DB = DBEngine.Workspaces(0).OpenDatabase(DBName)
Set qdf = DB.QueryDefs("TblName")
qdf.SQL = "SELECT MSysObjects.Name FROM MSysObjects WHERE
(((MSysObjects.Flags) In (0,16,128)) AND ((MSysObjects.Type)=1 Or
(MSysObjects.Type)=5));"
qdf.Close
End Function
Thanks you,
Sam