Hide Button after clicking on the button to open a form

  • Thread starter E-mail report using Lotus Notes rather t
  • Start date
E

E-mail report using Lotus Notes rather t

Hi,

Please let me know how i can hide a button after clicking on the same
button. I am able to click on a button and hide another button but does
Access allow you to hide the same button you just clicked on?

I used the following code to hide another button but why can't I hide the
same button:
Me.Command30.Visible = False

Thank you so much.
 
M

Mr. B

You can't hide or disable an control that has the focus. Set the focus to
some other control and then you can hide the button.

I do not know your applicaiton or what you are attempting to do, but I would
suggest that you might want to disable the button rather than hide it. You
will also need some way for the button to again becomd enabled or visible.

-----
HTH
Mr. B
http://www.askdoctoraccess.com/
Doctor Access Downloads Page:
http://www.askdoctoraccess.com/DownloadPage.htm
 
B

Bob Quintal

=?Utf-8?B?RS1tYWlsIHJlcG9ydCB1c2luZyBMb3R1cyBOb3RlcyByYXRoZXIgdA==?=
Hi,

Please let me know how i can hide a button after clicking on the
same button. I am able to click on a button and hide another
button but does Access allow you to hide the same button you just
clicked on?

I used the following code to hide another button but why can't I
hide the same button:
Me.Command30.Visible = False

Thank you so much.
You cannot hide any control, such as your button, if it has the focus.
The workaround is to set the focus to some othre control, e.g. a
textbox or a different button, then hide the button.

me.OtherControl.setfocus
me.Command30.visible = false.
 

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