Control Box visible

stuartford

Active Member
Joined
Nov 28, 2002
Messages
419
i need the control box(X) to become visible from my code.
normally it would be turned off but on one form if the criteria isnt met on load i would like it to be visible

i have tried
Forms.ControlBox = True

but it dont work
any ideas?

Cheers Stuart
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
Do you mean the close button on a form?

When do you want to make it visible?

Have you tried this:

Me.ControlBox = True
 
Upvote 0
yeah the close box

i want it top be visible on form open when the if statment i have is run

and i have tried the me.controlbox=true
and it dont work
Cheers
Stu
 
Upvote 0
Stu

I tried Forms("Form1").ControlBox = True in various events (Activate, Open, Load) and either got a 'can't set value' error or nothing happened at all.

What are you actually trying to do?
 
Upvote 0
i have a form with various text boxes on it
a query opens the form bassed on a date and product code entered the relavant info is populated on the form bassed on this.

if an incorrect date / or prod code is entered the form will have nothing populated.

as this is a change of deliverys concession form the close button is disabled because the user has to use a command button that records any changes that have been made and the user (via environ) that did it

if the wrong data is entered i would like the close button to be re enabled.

i suppose after the check for blank fields i could just close the form compleatly and get the user to start again.

would that be with docmd.close?

Stu
 
Upvote 0
i suppose after the check for blank fields i could just close the form compleatly and get the user to start again.

would that be with docmd.close?
That sounds like the best idea and I think code would work though you might try this instead just to be sure:

DoCmd.Close acForm, Me.Name
 
Upvote 0

Forum statistics

Threads
1,221,831
Messages
6,162,242
Members
451,756
Latest member
tommyw

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top