time stamp lock for records

A

Arvin Meyer [MVP]

Linda said:
Need to lock certain records after midnight each day. Help

If you can Identify the records, then (air code):

Sub Form_Current()

If Me.txtWhatever = 6 Then ' Identify the record
Me.AllowEdits = False
End If
End Sub
 
G

Guest

I apologize but I have only written a handful of code - can you please be a
little more specific, actually VERY specific with exact code- I see the logic
just want to be able to dot I's and cross t's. thanks again.
 
P

Pieter Wijnen

I sometimes get paid for this, but
Form /Properties/ OnCurrent / Builder ... (Event Proc)

Private Sub Form_Current()

If Time() < 21600 Then ' 21600 secconds = 6:00 AM
If Me.CriteriaField.Value = True Then ' I Assume a Yes/no Field is Used
to Flag the Record, a bit limited info available on that
Me.EnableEdit = False
Else
Me.EnableEdit = True
End If
Else
Me.EnableEdit = True
End If

End Sub

HTH

Pieter

"Pieter Wijnen"
 

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

Similar Threads


Top