Results 1 to 5 of 5
  1. #1
    TazoTazmaniac is offline Advanced Beginner
    Windows 7 64bit Access 2013
    Join Date
    Nov 2014
    Posts
    41

    'Remind Me In...' button with combo box to 'sleep' reminder for x amount of time?

    Hi all,

    I have created an AutoExec macro that will open up a pop up form on database open if there are any appointments that need rebooking (checks if there are any that are 7 or more days overdue) and then it lists the data. I have added in a combo box that has a list of values (1 hour, 2 hours, 4 hours, etc.) and what I would like to do (if it is possible) is to make the pop up box open after that amount of time. I'm sure it would involve the DateAdd function [DateAdd(h,2,Now())?] and the If function for whichever value is selected in the combo box, but I'm not sure what else to look at. Any suggestions?

    Thanks for your time.

  2. #2
    amrut is offline Expert
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jun 2012
    Location
    Dubai
    Posts
    614
    You have to use the form timer and not the DateAdd function. For a trial, set the timer interval to 5000( the timer interval is always in milliseconds) and put the following code in the form's timer event.
    Code:
     MsgBox " tiime up " 
    Me.timerInterval=0
    the message will show after 5 seconds . But, I think no other code/access functions will run till that time interval passes.

  3. #3
    TazoTazmaniac is offline Advanced Beginner
    Windows 7 64bit Access 2013
    Join Date
    Nov 2014
    Posts
    41
    Quote Originally Posted by amrut View Post
    But, I think no other code/access functions will run till that time interval passes.
    So I won't be able to use the database normally until those hours are done? If that's the case, I'm not sure that's what I want. Is there any other way?

  4. #4
    amrut is offline Expert
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jun 2012
    Location
    Dubai
    Posts
    614
    Give it a try, I am not sure if other code/functions will work.

  5. #5
    TazoTazmaniac is offline Advanced Beginner
    Windows 7 64bit Access 2013
    Join Date
    Nov 2014
    Posts
    41
    Thank you, it seems to work. I tried your code, made the message box timer a little longer and then added a button to do something else (i.e. open a form, open another message box). When clicking the button it worked fine and the original message box still popped up after the time stated. I think that's what you meant, right?

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 12
    Last Post: 07-18-2014, 01:22 PM
  2. Replies: 8
    Last Post: 12-18-2013, 03:00 PM
  3. Replies: 3
    Last Post: 01-31-2013, 06:29 PM
  4. Form goes to sleep
    By aytee111 in forum Forms
    Replies: 2
    Last Post: 04-23-2012, 05:23 PM
  5. Replies: 9
    Last Post: 07-16-2010, 09:25 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums