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

form in a form in a form bypasses the second

Status
Not open for further replies.

newnoviceuser

Programmer
Jan 4, 2003
63
US
a form called menu loads at start in this form is a command button called reports when i click on reports it opens the report form this form has a form on a timer.
form1 opens fine form2 opens fine form 3 opens fine

when timer is up and form 3 closes it doesn't go back to form2 it goes to form 1 i want it to go back to form 2. any ideas?
 
Maybe in the on close event of form 3
forms("form2").setfocus
 
I tried that.It flashes form 2 then straight back to form 1 I do not understand it.
 
Check the properties on these forms. What are the "modal" "popup" properties set to? Just thinking that form 1 is not a "popup" but form 2 is, so form 2 will want to be in front of form 1. Its a guess.
 
How are ya newnoviceuser . . .

Are you saying the Reports forms has three subforms three levels deep?

Calvin.gif
See Ya! . . . . . .
 
yes form one is a menu form 2 is a sub menu form 3 is more less a pop up message asking them to wait until an update is done. while form 3 is up form 2 is behind it when form 3 closes out form 2 form 1 pops up in front of form 2
 
form 1 and form 2 settings are the same pop up and modal are both no for each
 
newnoviceuser . . .

To force the issue, in the close event of form3:
Code:
[blue]   DoCmd.SelectObject acForm, "FormName"[/blue]

Calvin.gif
See Ya! . . . . . .
 
i tried it to no avail. whatever is causing it comes after form 3 closes. because form 2 is open in the background till after form 3 closes. as soon as it closes form 1 pops up in front of form2
 
newnoviceuser . . .

[blue]Then you have code somewhere thats selecting or causing form1 to be activated.[/blue] I suggest you put a [blue]breakpoint[/blue] in the [blue]ON timer[/blue] event of the [blue]Reports form[/blue] and follow the code from there and/or perform a search for the name of the [blue]Reports form[/blue] . . .

Calvin.gif
See Ya! . . . . . .
 
if I remove the third form, evertyhing works fine.
All the third form has on it is one label box that says "please wait while the update is performed"
and ontimer a close command
thats all that is on it
if i remove that form it doesnt bounce back
so there is no code to search it doesn't do anything
that is why i am so confused
on a different computer this thing works fine
but on mine bounces back been trying to figure it out for a week now
 
newnoviceuser . . .

Post the code in [blue]Timer[/blue] event . . .

Calvin.gif
See Ya! . . . . . .
 
I know this post may be a little old. I hope you have your problem fixed by now. If you found some work around okay. If not, you could try temporarily hiding the very first form. Code example:
Forms!Form1NameHere.Visible = False
This will hide the first form.
Then when you need to go back to form 1, as in when form 2 closes, just put this code into Form 2 On Close and set it to true.
If problem was never fixed, hope this can help.

Give a some fire, he will be warm for a day, Set a man on fire, he will be warm for the rest of his life.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top