You'll need some way of identifying the 8 newest records. I've never tried this, so I here's my first thought:
- Your table/query will need some way of knowing which records are newest. A date/time field would work.
- How to id the newest 8? You can use a top values query to find that. Save the query so you can call it repeatedly.
- You can then use the form's Current event to set the user's ability to edit records based on whether the current record is one of the top 8. Use a DCount function to test whether or not the current record's date/time field is one of the top 8. Something like:
Code:
If DCount("DateTime","qryTop8","DateTime=" & Me.[txtDateTime]))>0 Then
Me.AllowAdditions = False
Me.AllowDeletions = False
Me.AllowEdits = False
Else
Me.AllowAdditions = True
Me.AllowDeletions = True
Me.AllowEdits = True
End If
I'm sure this code will run quite slowly, unfortunately. And it won't be very effective in a multiuser environment.
I would cheat with subforms. Select the top 8 as dcx693 suggests and show these in a subform in edit mode. Select the rest and show these in a subform that is read only.