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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Bring A Subform To The Front With VBA

Status
Not open for further replies.

PEDZ118

IS-IT--Management
Feb 28, 2005
12
GB

I have a form with 2 subforms on it that are placed with one on top of the other one.

Depending on a variable i want either one to come to the front however i cant get the one that is behind to come to the front and be able to edit the fields on it.

I have tried using .setfocus on the one i want and .hide on the one i dont want but neither of these work.

I have had these working fine to display information by using the .visible but now i need to actually be able to work with them which is fine on the top one but not the bottom one.

Seems like i need to get the one at the back to come in front of the front one.

Any ideas??

PEDZ
 
It might be an issue of how you are referring to the subform object.

What is the name of the main form
What are the names of each of the subforms you are using
What are the names of each of the sub form controls that that they appear in.

Whats the code you are using to set .visible = false etc.




G LS
spsinkNOJUNK@yahoo.co.uk
Remove the NOJUNK to use.
 
Thanks for the reply

Managed to do it in the end by enabling the required form and disabling the other one combined with making the required one visible and both not visible by default.

Cheers
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top