RE: Close RECORD after a pre-defined time

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Believe me, we report the spam to Microsoft every day. I have no idea what
takes them so long to clean it up. Annoying, isn't it?

As to your question. You can use a timer event in a form do do whatever you
want.
The basic concept is to Dim a Moule level date time variable and populate it
with Now depending on when you want the time to start. If it is at the
record level, use the Form Current Event. That way the the countdown will
restart each time the user moves to a different record.

Dim dtmStartTime As Date


Private Sub Form_Current()

dtmStartTime = Now

Private Sub Form_Timer()

If DateDiff("n",dtmStartTime, Now) >= 20 Then
Docmd.Close acForm, Me.Name, acSaveNo
End If


So you could set your timer interval to one minute (60000) and the code to
check to see how long since the record changed would fire one each minute.
The example above closes the form. You might want to add a warning message
if you are a nice person <g>
--
Dave Hargis, Microsoft Access MVP


"RitchieJHicks" wrote:


Hi,

I realise that I can set a form or report to close after a predefined time
using the forms timer function, but how can I set a time to close a form or
record after a time of say 20 minutes.

I want to avoid a user sitting in a record (and therefore keeping it
locked). Turning off record locking isn't an option.

Also, how come there's so much spam on these forums now?

Thanks,
Ritchie.
.



Relevant Pages

  • Re: ** READ THIS BEFORE POSTING - answers to frequently asked questions 2003.08.24
    ... I believe most people use software to help them delete spam automatically ... Microsoft wouldn't go into your email to investigate, ... and 7) you or Microsoft tracking down spammers won't prevent ... It is pretty useless I think to report spam, because the source is hard to ...
    (microsoft.public.security)
  • Re: Unwanted Sexual e-mail
    ... | It appears to be fraudulent, how do I report it to Microsoft? ... Microsoft has nothing to do with spam. ... Contact your ISP to learn how to deal with spam. ...
    (microsoft.public.windowsxp.general)
  • Re: Newsgroups: MS should WARN us FIRST not to use real email addresses here!!
    ... I never asked for advice on how to solve the spam, I know I can change the ... Microsoft without any success... ... While you may know that there is no reason a real email address ... bit off the day I set up OE for these newsgroups. ...
    (microsoft.public.windows.inetexplorer.ie6_outlookexpress)
  • Re: Server Usage Report
    ... I can't seem to find a Web Usage Logging service? ... Download MPS report tool from: ... Microsoft CSS Online Newsgroup Support ... When opening a new thread via the web interface, we recommend you check ...
    (microsoft.public.windows.server.sbs)
  • Re: Strange SBS errors...
    ... MSSBSSSR.EXE is used to collect Server Status Report and Usage report. ... seems the monitoring component is corrupt. ... Microsoft CSS Online Newsgroup Support ... This newsgroup only focuses on SBS technical issues. ...
    (microsoft.public.windows.server.sbs)