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

DB Closes Automatically after 20min

Status
Not open for further replies.

TheAceMan1

Programmer
Sep 23, 2003
11,174
0
36
US
Howdy all!

Have a DB (inherited) that [blue]automatically closes after 20 to 25 minutes with no keyboard or mouse activity during that time.[/blue] Time stretches out with activity.

[ol][li]There's no [blue]AutoExec[/blue] Macro.[/li]
[li]The few other macros do not execute anything to do with timing. In fact, I've deleted them.[/li]
[li]A hardcore search in VBA for [blue]TimerInterval[/blue] reveals no timers are being set.[/li]
[li]Importing all [blue]Objects[/blue] to a new DB is no help.[/li][/ol]
[purple]Any Ideas! . . . . .[/purple]

Calvin.gif
See Ya! . . . . . .
 
AceMan, is a .dll or other external control / library loaded at any point?

Hope this helps.
 
Have you searched the VBA code for quit ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
PHV, something must be monitoring for (lack of) "activity" and AceMan says there is no trace of a Timer - hence my thoughts of some external mechanism.
 
PHV said:
[blue]Have you searched the VBA code for quit ?[/blue]
Yes! The only occurance is in a command button on the switchboard.

Calvin.gif
See Ya! . . . . . .
 
earthandfire . . . . .

Good Idea. I'll have to see what I can find . . .

Information I have is that is was origionally setup this way. I only want to disable it for programming purposes. [blue]Its something to be right in the middle of a powerful edit and the thing shuts down on ya[/blue] (let alone the embrassment in not finding it yet!).

Calvin.gif
See Ya! . . . . . .
 
Any Corrupted controls or objects?

________________________________________________________________________
Zameer Abdulla
Visit Me
Children are poor men's riches.
 
ZmrAbdulla said:
[blue]Any Corrupted controls or objects?[/blue]
Not that I know of! I would say I've exercised a good 4/5 of the code thru forms and no problemo.

When I first received the DB, one of the first things I did was a compile to see if their were any code problems. I initially received no errors. However, I kept noticing code modules were missing [blue]Option Explicit![/blue] So I ran code to insert the same in every module if not already included. The next compile reported quite a few errors, but these were all due to inproper control referencing and have been corrected.

Calvin.gif
See Ya! . . . . . .
 
How about any API's, such as FindWindow,CloseWindow, PostMessage (PostMessage hwnd, WM_CLOSE), etc, etc.

Also, Docmd.Close will quit the db if an object is selected with
Docmd.SelectObject, blah, blah,True ('True' = in database window).

This will leave msaccess.exe open however. Is this the case--that MSAccess.exe is still open but app is closed?
--Jim
 
There are utilities which will monitor for specific processes and shut them down after a specific length of time. There does not need to be a reference to this utility in the access application. If its one of these, it probably monitors msaccess.exe activity and shuts down the instance of msaccess after a period of time.

You could check this by creating and opening another db running on the same msaccess.exe and seeing if it shuts down too.


Ron

Isn't it great when it works the first time?
 
jsteph . . . . .

API's? I Thought about that too. Since [blue]most API's have at least one declaration[/blue] that goes in a declaration section, I performed a hardcore search ([blue]thats all modules in the modules window and code modules behind all forms[/blue]) using code to search for declaration sections with more that 2 lines of code. Results were a few public variables but [blue]no API's!.[/blue]

MS A . . . closes all the way!

Calvin.gif
See Ya! . . . . . .
 
greely . . . . .

The DB (front/back ends) were copied to my personnal system. I can tell ya there's no such utility.

My machine has a ton of DB's so its not my MS A. I stated earlier, dependable sources using the DB say the origional designer purposely made it this way, as its their intent to limit user session time.

Calvin.gif
See Ya! . . . . . .
 
Have you looked for a form whose properties is set to invisible - not showing up in the explorer pane? I know it's a stretch...
 
any references in code to the timer function?

Ron

Isn't it great when it works the first time?
 
dRahme . . . . .

Yes! After I open 3 or more forms, every now and then I minimize all that are open and [blue]run a routine that prints all open forms to the VBA Immediate Window.[/blue][blue][/blue] So far no luck!



Calvin.gif
See Ya! . . . . . .
 
greely . . . .

See my post origination #3.
TheAceMan said:
[blue][purple]HardCore Search:[/purple] Code that searches all modules in the modules window and code modules behind all forms for a specific string.[/blue]

Calvin.gif
See Ya! . . . . . .
 
Hmmm..

Is there perhaps

Screen.ActiveForm.Name
or
Screen.ActiveControl.Name

that is wrapped inside a date - time variable routine since you said time stretches with acitivity?

dRahme
 
original_Post_3 said:
A hardcore search in VBA for TimerInterval reveals no timers are being set

VB_Help said:
Timer Function: Returns a Single representing the number of seconds elapsed since midnight.

Not the same.

Its probable that the code causing the shutdown uses one of the date/time functions. I take it that your response to my previous post indicates that you have searched these without finding any suspect code.

Good Luck

Ron

Isn't it great when it works the first time?
 
greely . . . . .

Good shot but wrong Idea. The search is for the [blue]text[/blue] TimerInterval as in Me.[blue]TimerInverval[/blue] = 1000.



Calvin.gif
See Ya! . . . . . .
 
dRahme said:
[blue]. . . since you said time stretches with acitivity?[/blue]
To make things easier I'm attacking this from the perspective of [blue]no activity.[/blue] Which means a [blue]start time[/blue] has to held and subsequently compared to time continuation until a [blue]set limit[/blue] is reached.

Calvin.gif
See Ya! . . . . . .
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top