Allowedits, locking, etc. question

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.
 
B

Bruce Loving

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
 

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

Top