Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Queries / February 2008

Tip: Looking for answers? Try searching our database.

non updateable query

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
DD - 31 Jan 2008 22:33 GMT
i have a form with a command button on it that runs a query.  currently the
user can modify the data that is displayed when the query is run which
modifies the underlying table.  how can i prevent the user from modifying
data that is displayed in the query.

thanks
fredg - 31 Jan 2008 23:01 GMT
> i have a form with a command button on it that runs a query.  currently the
> user can modify the data that is displayed when the query is run which
> modifies the underlying table.  how can i prevent the user from modifying
> data that is displayed in the query.
>
> thanks

DoCmd.OpenQuery "QueryName", , acReadOnly
Signature

Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail

John W. Vinson - 31 Jan 2008 23:48 GMT
>i have a form with a command button on it that runs a query.  currently the
>user can modify the data that is displayed when the query is run which
>modifies the underlying table.  how can i prevent the user from modifying
>data that is displayed in the query.
>
>thanks

Open the query in design view; view its Properties; and set the Recordset Type
to Snapshot.

Generally it's best not to let users see query or table datasheets *at all*.
If the users need to see the data in a query, base a Form (with Allow Edits
set to No) on the query and show them the form.

            John W. Vinson [MVP]
Amy Blankenship - 01 Feb 2008 20:06 GMT
>>i have a form with a command button on it that runs a query.  currently
>>the
[quoted text clipped - 13 lines]
> Edits
> set to No) on the query and show them the form.

Or use a report...
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.