Hide Form SetFocus Issue

  • Thread starter mattc66 via AccessMonster.com
  • Start date
M

mattc66 via AccessMonster.com

Hi All,

I am trying to move to forcus to a main form and set a subform to visible =
false

Below is the code. Its not working. Can anyone help?

Me.frmQuotes.SetFocus

Forms!frmQuotes.Form!frmQuoteMultiBid.Visible = False
 
D

Douglas J. Steele

Since all you need to do is set the subform control to not visible, try

Forms!frmQuotes!frmQuoteMultiBid.Visible = False

If that doesn't work, double check that the name of the subform control is
correct: depending on how the form was added as a subform, the name of the
subform control isn't always the same as the name of the form being used as
a subform.
 
M

mattc66 via AccessMonster.com

I get an error message that your can't hide the control that has the focus. I
have the button on the form I want to hid.
Since all you need to do is set the subform control to not visible, try

Forms!frmQuotes!frmQuoteMultiBid.Visible = False

If that doesn't work, double check that the name of the subform control is
correct: depending on how the form was added as a subform, the name of the
subform control isn't always the same as the name of the form being used as
a subform.
[quoted text clipped - 7 lines]
Forms!frmQuotes.Form!frmQuoteMultiBid.Visible = False
 
D

Douglas J. Steele

You mean the button is on the form being used as a subform?

Set focus to somewhere on the parent form first.

--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


mattc66 via AccessMonster.com said:
I get an error message that your can't hide the control that has the focus.
I
have the button on the form I want to hid.
Since all you need to do is set the subform control to not visible, try

Forms!frmQuotes!frmQuoteMultiBid.Visible = False

If that doesn't work, double check that the name of the subform control is
correct: depending on how the form was added as a subform, the name of the
subform control isn't always the same as the name of the form being used
as
a subform.
[quoted text clipped - 7 lines]
Forms!frmQuotes.Form!frmQuoteMultiBid.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