Lock a record after saving.

  • Thread starter Thread starter ebev
  • Start date Start date
E

ebev

Hello all, I am new to Access and I have a question. In the IT dept. where I
work we have a daily checklist that we use. It was made in Access 2003 and a
data access page was set up. The data is set up in the table so each row is a
day and each column is the task that we are checking off. My IT manager wants
the database set up so when we are done for the day and create a new day
(row) the old day will lock and not be editable. Is it possible to do this
and if so how is it done? Thanks in advance for any help you can give.
 
The easiest way I can think of is to add a field (IsLocked - Yes/No) to each
table. Have code in each form's Current event check this field and set the
form's AllowEdits and AllowDeletions properties accordingly.

If you're currently viewing data directly from the tables, then change that
situation so that users view data only through forms. You can create a form
and set it to display data in DataSheet view, where it shows data in a way
that 'looks' just like a table, but has the advantage that you can put some
smarts behind it.

Regards,
Graham R Seach
Microsoft Access MVP
Sydney, Australia
 
We do use a form (data access page)to view the data. I created the "IsLocked"
field but I am still a little confused on how to actually code this in the
database.
 
Oh, I'm sorry, I missed the part in your original post where you said that
you were using a DAP. I'm afraid I have absolutely no knowledge of DAPs. I'd
suggest asking this question in the dataaccess.pages group.

Regards,
Graham R Seach
Microsoft Access MVP
Sydney, Australia
 
Back
Top