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

using Twin Screen and Screen.ActiveControl.Name on Timer to close

Status
Not open for further replies.

Snoopy098

Programmer
Aug 28, 2009
4
GB
thread702-1301504
I am trying to modify the Screen.ActiveControl using the [On Timer] to create and automatic closedown if not used for a period of time.
However the operators of the database use a twin and three screen system, opening other programs on the other screen, the database keeps tripping out with an error....
Here lies my problem.... Cant't appear to get it into my head, how to make it work.
Actually.... Dont think its possible... Hopefully I am wrong

Can anyone help... Please
 
Snoopy,

What IS the error? It would help.

I don't think that multi-screens should affect Access (but, it's always possible).

ATB

Darrylle

Never argue with an idiot, he'll bring you down to his level - then beat you with experience.
 
Hi Darrylle

The error is as follows:
The program runs correctly when only one of the two screens is used. if you open multiple programs, i.e. Outlook, Access DB, Excel, a couple of word doc's etc and keep them all on the same screen then no problem, after a 20 delay or inactivity on the access DB the popup screen appears and reminds the user that the program will close after a further 5 mins.... This is all fine.... Just like using it on a single screen system... works SPOT ON.
Problem Starts...... if one of the other programs, lets say, Outlook is on the second screen and you are siutting looking at your emails, the timer loop which looks at the Active.Screen trips up and forces Visual Basic on the ON ERROR section highlighting the line
ActiveControlName = Screen.ActiveControl.Name
If I understand things correctly... it errors because the active screen is actually Outlook and not the Access DB...
This is my problem.
We need a method of running the DB and getting the system to look at the program even when the focus is with say Outlook, Excel or a word document.
The VB i am using is the one that everyone else appears to use, it has been posted all round, I think however it was designed for a single screen system where teh DB is running on the same screen as whatever else the user is looking at (just in the background)...
I hope that this has clarified things... its a bit long winded i am afraid...

Regards
Snoopy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top