OK, jomara, here's what you can do.
1) Add a field called CraetionDate to your underlying table. Make it datatype
Date/Time, format General Date
2) If your form is based on a query, go into Design View for the query and
add the new field to the query (this is so it will show up in your Field List
for the form)
3) Add a text box to the form bound to this new field.
4) In the Properties Box for the text box set Visible to NO
5) Add a label called LockedWarning to your form. Have the text say something
like "This record is closed and cannot be edited!"
Now add this code:
Private Sub Form_Current()
If Me.NewRecord Then
Me.CreationDate.Value = Now() 'This sets the creation date/time for
the record
End If
If DateDiff("h", CreationDate, Now) > 24 Then 'Checks time lapse since
record creation
Me.AllowEdits = False 'If record is 24 hrs+ old it's locked
LockedWarning.Visible = True
Else: Me.AllowEdits = True 'If less than 24 hrs old it can be edited
LockedWarning.Visible = False
End If
End Sub
I think I've got everything here. Go an appointmet and gotta go. I'll check
back later to see if yu have any problems!