Allowedits, locking, etc. question

  • Thread starter Thread starter Brian
  • Start date Start date
B

Brian

Hey all,
I have a form w/ about 30 different text/combo boxes on it.
I have the default properties of the form set ot not allow
edits and additions, until the user clicks an "Add" or
"Edit" button. This is to primariyl prevent accidents from
happening. But, I have one combo box that holds a list of
some file names that are associated w/ each particular
record. So I want the values in the combo box selectable,
all the time, so that way a "View" button could be pressed.
Unfortunately, I can't do this b/c the AllowEdits property
is set to No so that way the accidents dont' occur. Is
there any way to get around this w/o toggling the "Locked"
properties of all the text/combo boxes on my form, or is
that the way I'm going ot have to go? Thanks.
 
this really isnt that bad of a problem

I use this
on the controls that you want to always have unlocked,
put the value 'Unlock' in the control.tag property

create a subroutine and call it to flip the locks.

private sub ToggleLock
dim frm as form
dim ctl as control
set frm = me
for each ctl in frm
if ctl.tag <> 'Unlock; then ctl.locked = not ctl.locked
next
set frm = nothing
end sub
 
Back
Top