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!

A query that allows to modify but not delete??

Status
Not open for further replies.

Muddman

MIS
May 22, 2001
13
0
0
US
I have a database that has a search screen that allows users to type in a piece of criteria and then search for it. It displays the results on a "Results form" and allows them to scroll through as many records as is returned. It also allows them to view in datasheet format which more or less just closes the form and simply shows the results of the query in datasheet format that is hiddin behind it.

I know that if I use the following syntax:

DoCmd.OpenQuery "Query Name", , as Readonly

that it will make the data unchangeble to the end user. Is there any command that I can uses in place of the Readonly to make the data, modifiable but not deletable????

Thanks in advance

 
i dont think so, not in a query.
here's what i do:

base a form on the query.
set the DEFAULT VIEW and VIEWS ALLOWED properties of the form to DATASHEET.

set ALLOW DELETIONS to NO.

g
 
GingerR

I tried your suggestion above, but it did not work. My form is based on a query and displays it's results correctly. That part works fine and the end user has no means to delete records from the form. The problem is when I allow them to view there results in datasheet format. That is where it allows them to delete the records which I am trying to avoid.

If you have any other suggestions, i would be more then willing to try them.

Thanks again for responding.


 
Hi there--um...just want to make sure you get what i meant. I do it all the time. I know you have a separate form that works ok, my suggestion is to make a second one that appears as a datasheet--looks just like a query recordset...but being in a form means you can set the property of ALLOW DELETES to NO.

just checking--g
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top