-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I'm not sure, but I believe you have to do it in a round-about way:
In VBA:
1. Create a named QueryDef
- CurrentDb.CreateQueryDef()
2. Open that query in design view
- docmd.OpenQuery "qry name",acViewDesign
2a. Use a timer event to watch for the query to be closed
- use the Northwind IsLoaded() function
3. Hope the user doesn't save the query under another name ;-)
4. Delete the just-created query
- docmd.DeleteObject acQuery, "qry name"
Sorta kludgey, but it may work.
Otherwise - give the users (each of them) a .mdb file that is linked
to the data tables & allow them to create all the junk they want.
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)
-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv
iQA/AwUBP+JxW4echKqOuFEgEQLaHgCfazAeQpeSFhxJ6Iy4hSXrOh uDo2AAnjmW
nD0i3xdmzxypF9xeY3aLXETJ
=JCg1
-----END PGP SIGNATURE-----
NB wrote:
Hi
Is there any way to call up the query design view from code?
In my compiled-as-MDE app everything is hidden from end users.
However, I want advanced user to have access to the query design view
so they can create, run and export their own query.
Another question is: can they be prevented from saving those
on-the-fly queries?
Thks
NB