Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Code for Protection

Status
Not open for further replies.

FreddyBotz

Technical User
Jul 1, 2001
35
US
I'm utilizing a shared file in which I want others to be able to run the query if necessary without gaining access to the code written in the query.

I've tried all of MS Access security features along with disabling certain keyboard functions. When all is said and done, you can still expand the column in the query in order to gain access to the code.


Any other suggestions?

Regards

FB
 
FB,
I think I am misunderstanding you. You are stating code in a query Do you mean code in a form that calls a record set? Are you talking about your SQL code? I am not sure what you are saying. Can you give me a little more detail. Maybe I can help
Thanks
Scotty ::)
 
Hey Scotty! Thanks for the response. I'm sure you've guessed by now that I'm new at Access. Here's the explanation: I left click on a column in my query, select the Build Icon and type in a code. Now, this file is to be shared with others; so how can I prevent someone from gaining access to that code, yet still allow them to run a query?

Regards

FB
 
FB,
Here is how I keep 85% of users out of my stuff. First rather than letting them run wild in the database. I put command buttons on a form and call it a menu. Say for instance if someone wanted to run a particular query I would put a button on a form and (you can use a macro for this) I put on the click event
Code:
DoCmd.OpenQuery "MyQuery"
as I stated you can build a macro that would open the query and just point the click event to the macro. Then I goto Tools > Startup... in the Display Form combo box I select my menu form...then I uncheck Dispay Database Window. What this will do is when someone runs the database it will it will bring up the Menu form. If they close the menu form they will not be able to see the main database window (the one with all the tabs on it). In order to see the main database windo all you have to do is select Window > Unhide...then select the database window and it will appear. As I stated this will keep about 85% of the end users out of your stuff. There is a lot of little tricks you can use to keep the common end user out. The ones you have to watch out for are the ones who think they know what they are doing (but actually dont.)
I hope this Helps
Scotty ::)
 
Scotty,

I don't see the relation between the form and the query. I was surprised myself that I was able to add a button to a form which would allow me to run the specified query from there. Problem is this, I simply click off forms and select Query and am right back where I started. I even followed your instructions as far as the menu options under the tools menu is concerned. What am I missing?

Thanks

FB
 
You have to shut down the database on your station at least once. Try that and then open it back up. When you do that close the form and the database window will be gone
Scotty ::)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top