Enabling/Disabling form's ControlBox in code

G

Guest

I want a certain form's ControlBox to be set to True or False depending on
certain conditions. This should take place upon form Activation. The
default condition is False. However, if I try to change it to True I get an
error on code execution that tells me "you can't assign a value to this
object". Excuse me? Why not? I'm able to change the properties of just
about any aspect of this form except ControlBox and CloseButton. Doesn't
make sense to me.

Any ideas?

Randall Arnold
 
G

Guest

Nevermind-- I see now that the box can only be enabled or disabled in design
View. That's just crazy, Microsoft! Sheesh. : (

Randall
 
D

Dirk Goldgar

Randall Arnold said:
Nevermind-- I see now that the box can only be enabled or disabled in
design View. That's just crazy, Microsoft! Sheesh. : (

I don't know for sure, but I expect it's because the control box is an
attribute of the window object as supplied by the operating system.
Maybe changing it while in form view would involve destroying the window
and recreating it, which would be very troublesome for the form. I'm
just guessing, mind.
 
G

Guest

You're probably right, Dirk. I wonder if this sort of thing will change with
the advent of Longhorn (Vista)...

Randall
 
D

Dirk Goldgar

Randall Arnold said:
You're probably right, Dirk. I wonder if this sort of thing will
change with the advent of Longhorn (Vista)...

I'd be inclined to doubt it. It's always possible that it could change
with the next release of Access, but I haven't heard anything to that
effect. It seems a pretty unusual need to me, so the odds are they
haven't done anything about it.
 
G

Guest

Maybe it's just me, but IMO the ability to enable/disable certain form
features based on user level wouldn't be that unusual. I constantly see
people asking for help along these lines...

Randall
 

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