Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Queries created with 'CREATE VIEW' are not shown

0 views
Skip to first unread message

Marius Krogh

unread,
Oct 11, 2001, 5:08:46 AM10/11/01
to
I've made an ASP-page which creates some views/queries in an Access2000 DB
by calling a 'CREATE VIEW' statement. If I open the database inside Access I
can't see the new queries, but I can call the queries from my ASP-pages.
When I open the table MySysQueries I can see the new queries. How can I make
the new queries visible when I hit the "Query-button" inside Access?

Thanks, Marius Krogh


bob...@postoffice.pacbell.net

unread,
Oct 11, 2001, 9:22:56 PM10/11/01
to
I looked for a property to change to make the queries visible in the user
interface but haven't found it yet. Does anyone know? It's a real hack but in
the start up you could make new queries using the information from the not
visible queries (I think you can tell them because the name begins with ~) .
Here's the code I used to snoop around plus a little air code.

Dim db As Database, cnt As Container, doc As Document, v1 As Variant
Dim prp As DAO.Property, tdf As DAO.QueryDef, rs As DAO.Recordset
Set db = CurrentDb()
'For Each tdf In db.QueryDefs
' Debug.Print tdf.Name
'Next tdf
Set tdf = db.QueryDefs("~sq_ffrmDesign")
For Each prp In tdf.Properties
Debug.Print prp.Name
Next prp
**********air code*********
set newTdf = db.createquerydef(...... actual sql = tdf.sql
Bobby

0 new messages