J
James D Carroll
I have a gui with several forms and subforms. I'd like to lock and unlock
certain controls at runtime, but for some reason, though I don't get an
error, the controls are not doing what I tell them to. All of them are
bound if that matters. The following code DOES work:
sub setAll(locked as boolean)
'this is so that controls that don't have a locked property don't cause
a probem
on error resume next
dim f as variant
dim c as variant
for each f in forms
for each c in f
c.locked = locked
next c
next f
end sub
It works fine whether I pass True or False, but when I try something like
the following:
sub lockGroup()
with Form_frmTest
.txtCtl1.locked = false
.txtCtr2.locked = false
.Repaint
end with
end sub
That code doesn't work. I call the .Repaint to in the hopes that maybe
Access wasn't updating the GUI right away, but it didn't help.
Thanks for any ideas,
PS: Access 97 w/ no SP's running on NT4 SP6
certain controls at runtime, but for some reason, though I don't get an
error, the controls are not doing what I tell them to. All of them are
bound if that matters. The following code DOES work:
sub setAll(locked as boolean)
'this is so that controls that don't have a locked property don't cause
a probem
on error resume next
dim f as variant
dim c as variant
for each f in forms
for each c in f
c.locked = locked
next c
next f
end sub
It works fine whether I pass True or False, but when I try something like
the following:
sub lockGroup()
with Form_frmTest
.txtCtl1.locked = false
.txtCtr2.locked = false
.Repaint
end with
end sub
That code doesn't work. I call the .Repaint to in the hopes that maybe
Access wasn't updating the GUI right away, but it didn't help.
Thanks for any ideas,
PS: Access 97 w/ no SP's running on NT4 SP6