How to hide button that has focus

  • Thread starter Thread starter ipellew
  • Start date Start date
I

ipellew

Hi;

I have a simple form that hides a few fields on the form when each
record is displayed.

I want to hide the button that shows the field that is 'visible=false',
but get "cannot hide when focus" when I press the button.

Advice please.

Regards
Ian
 
Hi;

I have a simple form that hides a few fields on the form when each
record is displayed.

I want to hide the button that shows the field that is 'visible=false',
but get "cannot hide when focus" when I press the button.

Advice please.

Regards
Ian

Set the focus to any other field first, then hide the button:

[SomeControl].Visible = False
[AnyOtherControl].SetFocus
[ThisButtonName].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

Back
Top