Locking specific rows within a query

chris_jolly

Registered User.
Local time
Today, 02:03
Joined
Jul 27, 2007
Messages
24
Locking specific columns within a query

Hey guys,

I have a query on a form in which I want to lock the first two rows to prevent the user from manipulating the data. The user will input information in the third column.

How would I go about this

Thanks
 
Last edited:
Columns, im sorry
 
Lock all rows displayed on the form. When any given row gets focus, if its to be available unlock it, otherwise lock it (again) to ne sure it's locked.

I often lock all rows and require the user to double-click a row to unlock it. This helps top prevent user's from inadvertently changing data.

What you're locking and unlcking dooing this is not the table or records themselves, but the table DAO recordset displayed in the form.
 
Hey guys,

I have a query on a form in which I want to lock the first two rows to prevent the user from manipulating the data. The user will input information in the third column.

How would I go about this

Thanks

The answer is, "use a form" because you can lock the controls which display the columns in a form but you don't really have that ability in a query (unless it is a calculated field).

But, for user interaction you should use forms and not let the user use tables or queries directly as you don't have events, etc. where you can control things like you do when using forms. You can even set the form to view in Datasheet mode which will make it LOOK to the user that they are in the query.
 
You should be showing your query in a continuous form. The fields in the query will show in individual controls (text boxes) on the form. You can set the properties of each control so they are locked or unlocked. The property is in the Properties Sheet for the controls. So lock the first two and leave the third unlocked.
 

Users who are viewing this thread

Back
Top Bottom