Allow/Deny edits and addition

  • Thread starter Thread starter Sok Hong
  • Start date Start date
S

Sok Hong

Hello,

On one of the forms I've created, I've set the form so
that edits can not be made on previous entered
information but allow new information to be added in the
new entry. However I want to set one combobox so that
information previously entered can be modified.

I've tried setting for the form as edits = no, deletion =
no, addition = no, but that won't allow me to edit the
combobox of interest.

I've also tried setting the form as edits = yes, then went
to individual comboboxes and set the enabled function to
yes, and locked function to no. However that will prevent
me from entering in new data.

Any clues on how I can go about this? Thanks.
 
Use the Current event of the form to programmatically alter the Locked
property of all bound controls except the combo, based on whether it's a new
record.

Something like this:

Private Sub Form_Current()
Dim bAllow As Boolean

bAllow = Me.NewRecord
Me.[SomeControl].Locked = bAllow
Me.[AnotherControl].Locked = bAllow
...
End Sub
 
Back
Top