Question Form Control Box

Privateer

Registered User.
Local time
Today, 18:20
Joined
Aug 16, 2011
Messages
193
I would like to flip the switch on the form's control box in VBA. The current code is:
Me.ControlBox = True
Me.CloseButton = True
It errors out on the first line saying I can't assign a value to this (2448). I know this can be done using the properties window, but I am changing how the form opens based on the form opening it. Any help would be appreciated.
 
Are you talking about a text box control on a form? If so, it is expecting a string assignment
eg
Me.MyTextbox = "Some text string"

Your code indicates you are trying to set it to True???????
Perhaps you can describe exactly what you're trying to do.
 
The minimum (underscore), maximum (box) and close (white X on red background) symbols in the upper right corner of all forms are in a control box. In the form's property you can modify what is displayed. I am trying to modify when and what is displayed when the form opens. So I am not trying to modify anything on the form, rather the form itself.
 
The minimum (underscore), maximum (box) and close (white X on red background) symbols in the upper right corner of all forms are in a control box. In the form's property you can modify what is displayed. I am trying to modify when and what is displayed when the form opens. So I am not trying to modify anything on the form, rather the form itself.

From the help file:
Access Help File said:
It can only be set in form Design view.
 
Last edited:
Thanks for the answer Bob, obviously I was hoping for a different answer. I just assumed all properties were available in VBA. BTW, your link pointed to a local url.
 
BTW, your link pointed to a local url.

Sorry, it wasn't supposed to be a link. But I guess it kept something that was there in the help file when I pasted it in. I've removed the link. :D
 

Users who are viewing this thread

Back
Top Bottom