Create read only query

AnnaFoot

Registered User.
Local time
Today, 20:43
Joined
Dec 5, 2000
Messages
51
Is there any way using
RunCommand acCmdNewObjectQuery
to open the query as read only?

Or.... is there another way to do it?
I'd like users to be able to create their own queries, but not to be able to "accidently" corrupt the data.

Thanks,

Anna
 
One thing to look into is replicating the database. You will have to evaluate it whether it would be more trouble than its worth, but it allows users to create new queries that will only effect there copy of the database. When synchronized, the database will combine everyone's data changes but not their unique queries.
 
Anna,

Allowing users to create their own queries, possibly accessing to Access wizards for that, is without doubt a great 'plus' for a DB dedicated to analysis.
However, it requires to be extremely carefull and secure/lock access to various objects and features.

Opening a query in read-only mode is not a difficult thing, but to my knowledge, you cannot do it using runcommand:
See Docmd.OpenQuery and its arguments instead.

I do not quite agree with doulostheou's advice. Replication is meant for an entirely different purpose and would be an un-necessary complication in your case.
Split your DB front-end (forms, queries, modules...)/ back-end (data only) if not already done. Then give a copy of the front end to each user, and have the back-end shared on a server. Each user will have the possiblity to "customize their front-end" within the limits of the security you have set up.

Be carefull when you design your security scheme to disable dangerous menus (contextual menu, append/delete/update queries, etc.), and to hide tables/queries you don t want your users to access to through wizards and Add Table menu.

Don t hesitate to re-post if you have more questions.

Alex



[This message has been edited by Alexandre (edited 02-15-2002).]
 
Thanks Alex,

Good ideas, i have set up the docmd.openquery as readonly situation offering them a chance to change a query they have already written, is there a similar way to create a new query? with the parameter options for readonly?

Thanks Anna
 
A couple of ideas:
You can save a void QBE grid and open it as an empty "new" query. Users would create their query and save it. You would have to handle the case when they will save their creation under the name of your "new" template (Ex: on next opening, check the SQL and display a message for the user to save the query under another name, then reset the SQL to "Select;").

Alex
 
Thanks Alex,

That's exactly what i did, with their own limited toolbar offering saveas as the only save option, and reminders everywhere to change the name!

Anna
 
smile.gif
Alex:2 - Queries:0
 

Users who are viewing this thread

Back
Top Bottom