S
Sky
Does anyone know how to open the standard Access 2007 new query design in a
compiled .mde or .accde?
My advanced customers sometimes need the capability to create queries
themselves.
In Access 2003 and prior, the standard RunCommand worked fine.
Access 2007, however, seems to disable the standard new query design command
once the database is compiled.
All of the following work fine in an uncompiled database:
DoCmd.RunCommand acCmdNewObjectDesignQuery
or
Application.CommandBars.ExecuteMso "CreateQueryInDesignView"
or
CommandBars.FindControl(Id:=12701).Execute
But when the database is compiled, all of the above cause flickering but do
nothing.
The following DOES work in both compiled and uncompiled databases:
DoCmd.RunCommand acCmdNewObjectQuery
The above opens the step-by-step query wizard, which is tedious for advanced
users and my customers do not like it as well. (It also starts out from
Application.CurrentObjectName, so you must be careful about the focus for a
new query, especially if the focus is on a referenced library object.) The
major disadvantage with acCmdNewObjectQuery is that it forces the user to
save an explicit query name before continuing to view or design it.
Nevertheless, acCmdNewObjectQuery is my current solution.
Also the following works fine in a compiled database, for an existing query:
DoCmd.OpenQuery strName, acViewDesign
Clearly Microsoft does not prevent query design in a compiled Mde, but
acCmdNewObjectDesignQuery does not work.
Does anyone know how to execute an equivalent to acCmdNewObjectDesignQuery
in a compiled Mde?
- Steve
compiled .mde or .accde?
My advanced customers sometimes need the capability to create queries
themselves.
In Access 2003 and prior, the standard RunCommand worked fine.
Access 2007, however, seems to disable the standard new query design command
once the database is compiled.
All of the following work fine in an uncompiled database:
DoCmd.RunCommand acCmdNewObjectDesignQuery
or
Application.CommandBars.ExecuteMso "CreateQueryInDesignView"
or
CommandBars.FindControl(Id:=12701).Execute
But when the database is compiled, all of the above cause flickering but do
nothing.
The following DOES work in both compiled and uncompiled databases:
DoCmd.RunCommand acCmdNewObjectQuery
The above opens the step-by-step query wizard, which is tedious for advanced
users and my customers do not like it as well. (It also starts out from
Application.CurrentObjectName, so you must be careful about the focus for a
new query, especially if the focus is on a referenced library object.) The
major disadvantage with acCmdNewObjectQuery is that it forces the user to
save an explicit query name before continuing to view or design it.
Nevertheless, acCmdNewObjectQuery is my current solution.
Also the following works fine in a compiled database, for an existing query:
DoCmd.OpenQuery strName, acViewDesign
Clearly Microsoft does not prevent query design in a compiled Mde, but
acCmdNewObjectDesignQuery does not work.
Does anyone know how to execute an equivalent to acCmdNewObjectDesignQuery
in a compiled Mde?
- Steve