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...