?
Solved

Access Query only Edit

Posted on 2014-01-30
3
Medium Priority
?
319 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 2000 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 51

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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Suggested Courses

762 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