Wrox Programmer Forums
|
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 22nd, 2009, 12:25 PM
Friend of Wrox
 
Join Date: Jun 2005
Posts: 181
Thanks: 0
Thanked 0 Times in 0 Posts
Default Create New Query

Hi All
I need to be able to let a user create a new query in a form. So I want the user to be able to click a command button and see the Create new Query Dialog Box.I have tried several runcommand options and cannot get it working
Thanks
__________________
Brendan Bartley
 
Old April 22nd, 2009, 02:39 PM
Authorized User
 
Join Date: Jul 2008
Posts: 38
Thanks: 1
Thanked 2 Times in 2 Posts
Default

Quote:
Originally Posted by Brendan Bartley View Post
Hi All
I need to be able to let a user create a new query in a form. So I want the user to be able to click a command button and see the Create new Query Dialog Box.I have tried several runcommand options and cannot get it working
Thanks
I'm sorry, but I have to ask WHY do you need to let a user create a new query in your program? If they need to do their own queries then it should be done from a separate linked database and they can go into the QBE grid from there.

Also, this should be a split database (frontend on user's machine and backend on the file server).

You can, however, with a lot of coding create a form which would let users select the tables and criteria and you build the query on the fly which then can be viewed. However, this should not be saved in the database (unless you save the SQL string in a table somewhere and then pull it out for them).

So what is it that you are really trying to do for the user and what would be the problem of them having a linked database where they can create all the queries they want?
__________________
Thanks,

Bob Larson
Access MVP (2008-2010, 2011)
Free Access tutorials, samples, tools
 
Old April 22nd, 2009, 07:41 PM
Authorized User
 
Join Date: Jul 2008
Posts: 38
Thanks: 1
Thanked 2 Times in 2 Posts
Default

I also just want to say - I'm not trying to be difficult just for the sake of being difficult. Letting users create objects within a database is risky, not only from a standpoint of them screwing something up, but also maintainability. How do you maintain separate frontends for everyone who creates their own queries - and then how do you merge everyones frontends together so that they don't lose their stuff?

The answer may seem to be "just use a single shared frontend" which on the surface looks like a good solution. But, you don't want that for multiple users because that is a sure fire way to end up with a corrupt database and losing everything.

So, anyway, hopefully that helps with some of the "why" I posted what I did.
__________________
Thanks,

Bob Larson
Access MVP (2008-2010, 2011)
Free Access tutorials, samples, tools





Similar Threads
Thread Thread Starter Forum Replies Last Post
Create a field in a query Vision G Access 1 July 26th, 2006 03:33 PM
How to Create Join Script for a Query ....... ZArrinPour SQL Server 2000 0 June 25th, 2006 11:48 AM
create query at runtime vipinpaliwal1980 Access 1 April 24th, 2006 06:27 AM
Can anyone create this query for me??????????? avats SQL Language 1 August 23rd, 2005 01:07 PM
create query through a form madeira Access 4 September 26th, 2003 06:53 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.