How to lock users from modifying some records?

G

Guest

I have a master form that calls the detail form via push of a button (its not
a subform to the main form)

When I display records in the detail form, I would like users to be able to
modify only the last record and not allow them to make any changes to
previous records.

I am wondering how can this be done in Access database linked with Sql
server tables.

If its not possible to lock other records, then I would like to stop them
from modifying any records after create, how to do this?

Thank you in advance!
-Me
 
M

Marshall Barton

Me said:
I have a master form that calls the detail form via push of a button (its not
a subform to the main form)

When I display records in the detail form, I would like users to be able to
modify only the last record and not allow them to make any changes to
previous records.

I am wondering how can this be done in Access database linked with Sql
server tables.

If its not possible to lock other records, then I would like to stop them
from modifying any records after create, how to do this?


In the detail form's Current event check which record you're
on:

With Me.RecordsetClone
,MoveLast
Me.AllowEdits = (Me.CurrentRecord = .RecordCount)
End With
 

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