By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,454 Members | 2,633 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,454 IT Pros & Developers. It's quick & easy.

Pop up form sometimes opens behind another, why?

P: 10
Hello all, im fairly new to access but learing fast and i have written a tuch screen app to record mechanics time and work clockings, it works very well i feel and is a huge improvement on our previous commercial app but i have one issue..
my app runs on a 12" tuch screen monitor attached to a pc, the app runs at start up and the first form to open is a splash, this form then loads a hidden form to keep a query open and save repeating record locking files for speed, next the splash window maximises and loads the main screen as a modal pop up. each action the user makes closes the preceding screen and opens the next (leaving the maximised splash screen open) this method keeps all the pc desktop away from the users and makes it look nice. however every now and then like once in 200 opperations the user hits a button and what ever screen they are using closes as it should but the new screen loads behind the splash.....
the problem is that as the newly opened screen is modal the app wont accept any inupt from the user. I get around this when it happens by fetching out the keyboard and hitting ctrl alt del then canceling it, the appp then displays as it should so i can tell that the form had loaded and it must have been behind the splash.

Any ideas as to how to prevent this randum occurance or if not how to get past it without the use of a keyboard as i hope to run the app from a micro pc in future.
p.s i though about an ontimer event to reopen the main form but you can bet your bottom dollar that this will happen as a user is about to use the screen.
thanks in advance Nick
Apr 20 '12 #1
Share this Question
Share on Google+
3 Replies


TheSmileyCoder
Expert Mod 100+
P: 2,321
Sounds weird. I dont have anything off the top of my head, but to ask for some more information:

What version of access are you using?
Are you using a mdb, mde, accdb or accde?
Can you provide an example of the code you use when you switch between forms?
Apr 22 '12 #2

P: 10
Hi Thanks for the reply
Using Access 2010
file type is accde
mostly using macros to process variables then open new form and then close old form
depending on variables sometimes a macro will runcode() then vba will execute udate statments then the macro will contimue and do the open new form and close old form bit.

i suppose i could stop the macor after the runcode() and then use vba to close and open the forms but its so randum its hard to know why.

i suppose that the sql updates could take too long every now and then and perhaps this causes the error.
And yes i just checked all my forms are opend and closed with macros and some execute vba before the new window is opened and the old one is closed.

Access 2010 makes macros so easy i dont use my brain and write the vba. do you think this could be an issue?
Thanks in advance
Nick
Apr 22 '12 #3

TheSmileyCoder
Expert Mod 100+
P: 2,321
I have never used macros besides maybe my first month of using Access. The versatility of VBA is just more powerfull. While there are many actions that could be done by macros, I find that mixing VBA and macros together might be confusing. So therefore I've stuck to keeping all actions in VBA.

I've had some weird issues with timing in Access 2010 as well, and have yet to uncover why. The only suggestion or advice I have to offer currently is to look at the "Wait for post Processing" property of (all) your forms, and try to set that to True/Yes. Im thinking maybe its related to the form(s) not waiting until all code is done. Please report back if this helps any.
Apr 23 '12 #4

Post your reply

Sign in to post your reply or Sign up for a free account.