Lock a record after saving.

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

Graham R Seach

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
 
E

ebev

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

Graham R Seach

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top