Read Only Query

LadyDi

Registered User.
Local time
Today, 11:33
Joined
Mar 29, 2007
Messages
894
Is there a way to make a regular select query read only? A user recently went into a database, ran a query and then cut and pasted the results into Excel instead of exporting it or "Analzying" it with Excel. As a result, the data is not gone out of the database. I would like to prevent this from happening again, but am unsure how to go about it.
 
It seems as if your users can get to your queries the entire db is at risk. Are you allowing them access to the tables and queries directly?
 
This isn't actually one of my databases. It is one that I am helping a co-worker with. When the database was set up, she wanted her co-workers to be able to go in and create their own queries. So, to answer your question, yes, her co-workers have access to the tables and queries directly.
 
Is there a way to make a regular select query read only? A user recently went into a database, ran a query and then cut and pasted the results into Excel instead of exporting it or "Analzying" it with Excel. As a result, the data is not gone out of the database. I would like to prevent this from happening again, but am unsure how to go about it.

personally, i don't know if the GUI has an option. but what you can do is create a form that has a list of queries in it, and on double click of one of them, open the query with code and add the readonly argument to the docmd
 
Thank you for the advice. She and I will work on the database either tomorrow or next week. I have one quick question. What is the docmd read only argument? I typed in docmd.readonly on one of my databases and nothing appeared.
 
Where did you read that would do something?
 
I didn't read anywhere that would do something. I have entered docmd arguements before, but not the read only one. I was just letting you know what I tried. As I explained in the previous post, I don't know how to get the docmd read only arguement.
 
Are you talking about something like:

DoCmd.OpenQuery "Sales Totals Query", , acReadOnly

??
 
Yes, that is what I was looking for. Thank you.
 
You're welcome. :)

You can type in the first part:

DoCmd.OpenQuery

Then put the cursor in the OpenQuery part and hit F1 and you should see the 'Help' with all of the options.

Edit: One parting note; I think I would create a stand alone database with just the tables linked back to the main database and let the users create their own queries there instead of letting them tinker around in the main database...
 
Edit: One parting note; I think I would create a stand alone database with just the tables linked back to the main database and let the users create their own queries there instead of letting them tinker around in the main database...
Just linking them to tables won't make them read only. But if you created queries of the tables and set their property to SNAPSHOT (in the properties dialog that is available when you open a query in design view) then you could do that and they would be truly read only.
 
Thank you for the information. It is very much appreciated.
 

Users who are viewing this thread

Back
Top Bottom