Create view statement

G

Guest

Microsoft Jet Engine does not support the use of Create view statement. If I
want to create a view in MS Access 2003 is there any way i can do it? Thanks.
 
W

Wayne Morgan

If you are talking about a View in SQL Server, if you create an .adp (Access
Data Project) file instead of an .mdb file in Access, I believe you can use
it to create a View.
 
A

Albert D. Kallal

Microsoft Jet Engine does not support the use of Create view statement. If
I
want to create a view in MS Access 2003 is there any way i can do it?
Thanks.

Actually, the JET engine does support this.

However, before you use the create view, you are aware that a select query
(a standard query) that you make and save in ms-access sis a view?

Thus, you can simply add a query to the database..and that for all intensive
purposes is a view.

You can also use DLL commands (sql) to create a view. If you hit ctrl-g and
bring up the debug window..then:

currentproject.Connection.Execute "create VIEW ZOO1 (LastName) as select
LastName from Contacts"

The above will in fact create a view called ZOO1 based on table Contacts.
And, after executing the above..you also see that a query called zoo1 was in
fact created if you go and look at the queries tab.

Also note that the DDL sql for the above only works with ADO..and not dao,
hence, typing the following in the debug window:

currentproject.Connection.Execute "create VIEW ZOO1 (LastName) as select
LastName from Contacts"

The above will work, but:

currentdb.Execute "create VIEW ZOO1 (LastName) as select LastName from
Contacts"

will not! (the above is DAO). And, this also means that you can't type the
above DDL into the query builder either, and hit ! to run.

It is not clear if you are wondering how to create views (which are simply
quires) in ms-access via code, or if you are just in fact wondering if JET
(and ms-access) supports the concept of views? Either way...a saved select
query in ms-access is a view.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top