Solved

Access Query only Edit

Posted on 2014-01-30
3
315 Views
Last Modified: 2014-01-30
Hi Experts,

I have a Query where i would like to allow the users to Edit the Records in the list. But prevent the users from Inserting new Records. Is that possible?
0
Comment
Question by:DCRAPACCESS
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 61

Accepted Solution

by:
mbizup earned 500 total points
ID: 39820380
That's not possible with a query.

However you can use a form and set its recordsource to that query, then set the following form properties:

AllowEdits:  Yes
AllowAdditions:  NO

And for a query like interface, set the default view of the form to Datasheet.


As a rule, you should always give users a form interface to view and edit data.  Never give them direct access to queries or tables.  A form interface gives you (the developer) much more control over what the user can or cannot do.
0
 
LVL 30

Expert Comment

by:hnasr
ID: 39820454
Assumptions:
User has no access to query modification.

One way:
Assume
table hh(hhid, hhdesc)  pk hhid
table hhh(hhid, hhhid, hhhdesc) compound pk hhid & hhhid

Database Tooks > Relationships:
hh(hhid)  1 -----> M hhh(hhid)

Set Referential integrity.

Query to release to users, removing part of compound key:
User is allowed only to modify existing records. If user tries to enter a new record, referential integrity won't allow it.

SELECT hhh.hhhid, hhh.hhhdesc
FROM hhh;

Open in new window

0
 
LVL 50

Expert Comment

by:Gustav Brock
ID: 39820678
Just drag the query and drop it onto a new form in design view, and it will create a subform holding your query. In this, set AllowAdditions to False.

/gustav
0

Featured Post

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question