Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

LostFocus

Status
Not open for further replies.

newfrontiers

Programmer
Oct 17, 2001
134
US
Hello. I have been spinning my wheels for two days now. I have a form that I am using as a header where a user can select from a combo box any open form.

The "header" form works, but I am trying to create a user interface where only one form appears on the screen below the "header" form. Otherwise it is possible that the user screen gets cluttered.

So I have been trying to get a form (other then the "header" form which is always present) to become invisible once the user clicks out of the form. I have been trying the LostFocus and GetFocus to set the Visible=False and Visible=True respectively, but it has not worked.

I have looked through Tek-Tips for a solution but nothing seems to address the issue.

Any help is greatly appreciated.

Thanks,

John

 
Setup the Header form as your main form, then add a subform control. In the Change event of your combo box, set the subform control's SourceObject property to the form name selected from the combo box.

Me.subform.SourceObject = Me.combobox.Value

Note: You have to be sure the value in the combobox corresponds to the form object names in your database.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top