Let's try again, then.
1) Access/Jet does not have views. Therefore it's not possible to create
a view in Jet SQL.
2) The Access/Jet equivalent to a view is a Select query, but's not
possible to create a Select query in Jet SQL.
3) Instead you can create a Select query under program control in VBA
using something like
Dim dbD As DAO.Database
Dim qdQ As QueryDef
Set dbD = CurrentDb()
Set qdQ = dbD.CreateQueryDef("qryName", "SELECT * FROM tbl;")
Set qdQ = Nothing
Set dbD = Nothing
4) Often, however, one doesn't need to explicitly create a query: all
that's necessary is to assign a SQL statement to the DataSource or
RowSource property of an existing form or control, or to use it to
create a recordset. For "action queries", just execute the SQL
statement.
5) Also, it's not hard to write VBA code that parses a simple SQL script
and creates the corresponding objects using DAO.
Well, in fact, I had known that Query is the Access equivalent to View. What
I want to do is creating a View/Query by writing the SQL statements not by
normal operations. After I had a try, I found that the Jet SQL doesn't
support the 'Create View' statement, which is implemented as a standard
statement in other database systems. So I was puzzled and waiting for help.
John Nurick said:
The Access/Jet equivalent to a view is a Select query.
Jet SQL is documented in Microsoft Access help. In recent
English-language versions, display the Help window and look on the
Contents tab for "Microsoft Jet SQL reference".
Can any body tell me how to create a View in Access using Jet SQL? And where
to get the detailed specific reference for Jet SQL?
John Nurick [Microsoft Access MVP]
Please respond in the newgroup and not by email.
John Nurick [Microsoft Access MVP]
Please respond in the newgroup and not by email.