473,406 Members | 2,387 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Disable the edit property of a query

1
I have a simple query that I run to allow a user to do datamining. This simple query will allow the user to change the data. I don't want to allow this. Is there a way to disable edits in a simple select query.
Oct 19 '12 #1

✓ answered by NeoPa

For the query itself, set the Recordset Type property to Snapshot.

7 16223
zmbd
5,501 Expert Mod 4TB
In short not from the query.
If you have V2010 there are table level macros

What I would do is the following.
Build a form based on the query and lock down the form.

Now that doesn't prevent the user from opening the query...

So what I do is develop my form based on the query and then copy the SQL behind the query and go directly to the form's properties and paste that into the record sorce then delete the orignal query. I do this quite often... most of my production databases do not have any of the queries available directly to the user, they are all coded into the forms and only added to the querydef collection for certian types of reports, exports, and connection that require resolved objects.
Oct 19 '12 #2
Rabbit
12,516 Expert Mod 8TB
I think they mean edit the data resulting from the query. To disable editing the data, in the form properties, set the allow edits option to false.
Oct 19 '12 #3
NeoPa
32,556 Expert Mod 16PB
For the query itself, set the Recordset Type property to Snapshot.
Oct 19 '12 #4
zmbd
5,501 Expert Mod 4TB
Thank you NeoPa,
I forget about that option in the properties page.
I found that many of my users know how to change that too... problem when you work with a bunch of Chemists - too curious for our own good! :)
Oct 19 '12 #5
NeoPa
32,556 Expert Mod 16PB
Indeed. That's exactly my understanding of Chemists. They clearly have the right way of thinking for programming and logic. That probably explains why so many of our regular contributors come from that discipline.
Oct 19 '12 #6
TheSmileyCoder
2,322 Expert Mod 2GB
I would say the best approach would be to setup a form that controls the query, and have the forms AllowEdits set to false.

In short, think of it this way:
Query and tables are for the developer
Forms are really the way Access intends for users to interact with data, and its your job as developer to create the right forms.
Oct 22 '12 #7
NeoPa
32,556 Expert Mod 16PB
I agree that's the correct way to approach matters generally, and is well worth bearing in mind. That doesn't necessarily mean it's wrong to disable editing on a query, but the design of the query needn't encapsulate everything required for the form, as the form is the main means of the user interfacing with the data.
Oct 22 '12 #8

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Paweł | last post by:
Hi! Within my class (say class A) I have read-only property returning reference to object of type B (since I do not want other to assign another reference to this property). I have created a ...
0
by: AP | last post by:
When running an application through the debugger any edits to the source file will take VC7 about 5 min before it gives back control. It's trying to check dependencies or something like that. Is...
1
by: Lars Netzel | last post by:
Hello, Making your own WebCustomControl, how you do disable properties in the design view? For example my WebCustomControl does not use text, so the default property Font is missleading when...
1
by: drum2001 | last post by:
I have the following Table: Table: TASKINFORMATION - TaskName - TaskType - TaskDescription - TaskStartDate - TaskEndDate - Status - Comments
6
by: kevin | last post by:
using VS.2003... This has annoyed me endlessly. I hate the visual query designer in VS. Is it possible through add-ins or extensions to have query's you want to edit open in query analyzer,...
1
by: Mike P | last post by:
How do you disable the edit button for selected rows in a gridview? Here is my button : <asp:CommandField ShowEditButton="True" ButtonType="Link" ShowCancelButton="True" UpdateText="Update"...
0
by: TT | last post by:
Hello. I'm working in asp.net and i need to disable the edit/delete functionality from a frmview component. help me.thang you! my ACL sub: Protected Sub Page_Load(ByVal sender As Object,...
3
by: julia_beresford | last post by:
Hi I have a main class with a public property of type sub class, which has several properties of type int. When i assign an instance of my main class to propertyGrid.SelectedObject I cannot...
2
by: premrajap | last post by:
How can i enable /disable the sort button of C# property grid??
1
by: mahendra dubey | last post by:
Hi There I am working on my first WPF project.I have a TextBox control.In Binding property of this TextBox,I want to set ValidatesOnDataErrors=true. But if this TextBox is disabled then I...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.