Lock data

  • Thread starter Thread starter judith
  • Start date Start date
J

judith

I have set a lock on the On Current property for my form

Me.Form.AllowEdits = true

' check for approved
If Me.approved > 0 Then
Me.Form.AllowEdits = False
End If

Unfortunately there is a combo, select record box on the form so I cant then
move to another record as this is locked too. There are too many fields to
lock them individually rather than the entire form. Any suggestions please.
 
On Wed, 28 Apr 2010 06:46:01 -0700, judith

You can loop over the Controls collection and not lock some controls
that should stay active:
dim ctl as control
for each ctl in me.controls
if me.name ="myFirstUnlockedControl" or
me.name="mySecondUnlockedControl" then
'do nothing
else
ctl.Locked = True
end if

-Tom.
Microsoft Access MVP
 
Back
Top