Locking of Entered Data

G

Guest

I have a Form with two Subforms. In one of the subforms, I want the client
to enter comments. It auto populates the date, time, and user name. Now the
next time this record is viewed, I want all the comments entered earlier to
be able to be viewed but not be changed. Ideas?
 
A

Allen Browne

Open the subform in design view, and set its AllowEdits property to No.

You probably want to set AllowDeletions to No as well.

Provided you leave AllowAdditions as Yes, the user can still add new
records.
 
G

Guest

If you want all the subform's controls to be uneditable apart from when
entering a new record then in its Current event procedure put:

Me.AllowEdits = Me.NewRecord

If its just the Comments control then put:

Me.Comments.Enabled = Me.NewRecord
Me.Comments.Locked = Not Me.NewRecord

Ken Sheridan
Stafford, England
 
G

Guest

Thank you Both!

Ken Sheridan said:
If you want all the subform's controls to be uneditable apart from when
entering a new record then in its Current event procedure put:

Me.AllowEdits = Me.NewRecord

If its just the Comments control then put:

Me.Comments.Enabled = Me.NewRecord
Me.Comments.Locked = Not Me.NewRecord

Ken Sheridan
Stafford, England
 

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