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

Hidden Form not remaining hidden.

Status
Not open for further replies.

DaveTappenden

Programmer
Jan 16, 2002
21
0
0
Hello,

Imagine if you will a simple application with 3 forms.
frmMenu, frmA, frmB

frmMenu has a command button to hide itself and open frmA
me.visible = false
doCmd.openform "frmA"

frmA (a summary screen) has a command button to close itself before calling frmB (has a timer, so I want it closed)
DoCmd.Close
DoCmd.OpenForm "frmB", , , , acFormAdd

frmB (detail screen) has a command button to close itself and open frmA.
doCmd.close
doCmd.OpenForm "frmA"

IT GOES WRONG HERE

frmA opens correctly, but BEHIND the (now visible) frmMenu. I havent run any code to make frmMenu unhide itself, but simply opening frmA seems to make this happen.

Any ideas why this is happening would be appreciated!


 
Have you tried to play with the DoCmd.Minimize, .Restore methods instead of the .Visible form's property ?

Hope This Help, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Dave

I assume that eventually, you want to return to frmMenu, for which it has to become visible.

What event or series of events do you rely on to make the frmMenu visible?

Now trace your code, and see if the event is being fired off inadvertantly. (Put a STOP statement early into your code, and then use F8 to step through)

Usuallym this is when my right gets fatter and longer and my forehead develops a triangular slant - drat - slap... ;-)

Richard
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top