Results 1 to 10 of 10

Thread: Popup Reminder

  1. #1
    Join Date
    Sep 2008
    Posts
    20

    Unanswered: Popup Reminder

    I need to have a reminder popup in the form called “Orders”. I have been trying to figure out a lot of solutions but can’t find a simple one. The text boxes I want to add are just; task date, reminder date and task detail. When I log in the Orders form, automatically a list opens with the task/s to be done and when double clicking on the info, the list box opens the Order to check further detail about the reminded-record.

    This is a simple workout from where I got the idea:

    http://www.msaccesstips.com/2007/09/...r-popups.shtml

  2. #2
    Join Date
    Aug 2006
    Posts
    559
    I used what you're trying to do on another DB and I'm trying to get it up / out now. The freaking person who configured the server at my work royally pooched it and on ANYTHING that is Microsoft, it just freaking hangs for like 10 minutes. I can't get a mouse to scroll using the wheel, can't get anything from "All Programs" menu, can't get a right-click on the mouse, NOTHING.

    Anyways...Sorry to thread-jack...

    This is the code that I have for my "on close" event after the user logs into the DB from the form Logon:
    Code:
    Private Sub Form_Close()
    
      'Run query to see if there are any overdue tasks using qryReminder
    'Send output of "If tasks are overdue, then ask user if they wish to view
    'User can select Yes/No
    
    Dim lngCount As Long
    
    lngCount = Nz(DCount("DaysSinceOriginated", "qryReminder"), 0)
    
    If lngCount > 0 Then
    
        If MsgBox("There are " & lngCount & " overdue tasks. Would you like to view the overdue tasks?", vbYesNo + vbExclamation) = vbYes Then
            DoCmd.OpenForm "frmReminders"
        Else
            DoCmd.OpenForm "frmMainMenu"
        End If
        
    Else
    
        DoCmd.OpenForm "frmMainMenu"
    End If
    
    End Sub
    It checks the 'Task Start Date' from the 'current date' then says how many tasks are over 7 days outstanding. If the user clicks "Yes" to open the tasks, it opens them in a listbox with minimal viewable data. They then have two options, print as they see it on the screen in the listbox OR print detailed listing with ALL information.

    Hope it helps you out a bit. Let us know!

  3. #3
    Join Date
    Sep 2008
    Posts
    20
    Hi Grafixx01, your idea sounds great but unforuntely i cant figure out precisly the code. What are your query/forms names and what are your field names you are addressing in this code? Sorry but i find it hard to understand and learn sometimes Thanks mate

  4. #4
    Join Date
    Aug 2006
    Posts
    559
    Quote Originally Posted by 8thstudios
    Hi Grafixx01, your idea sounds great but unforuntely i cant figure out precisly the code. What are your query/forms names and what are your field names you are addressing in this code? Sorry but i find it hard to understand and learn sometimes Thanks mate

    The DB I have it in is attached. Just unzip and open it. HOLD down shift to bypass the security.

    You can try just double-clicking on the frmSplashScreen and see if it'll let you in using one of the following user names and passwords. Been a while since I messed with this DB.

    User Name: Admin
    Password: password

    User Name: Zena.Tysz
    Password: password

    They're set up as Admin on it so you should get access to everything. But holding down the shift key will bypass all security.

    Let me know if you need more help.

    Bryan
    Attached Files Attached Files

  5. #5
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926
    Quickly glancing at your code (and disregarding your other questions/issues), shouldn't this...

    lngCount = Nz(DCount("DaysSinceOriginated", "qryReminder"), 0)

    be this...

    lngCount = Nz(DCount("[DaysSinceOriginated]", "qryReminder"), 0)

    (notice the brackets around "DaysSinceOriginated")

    I might also put in this after the line of code...

    msgbox lngCount

    to see what value is actually returned for lngCount.

    And lastly (I know - it's not good to always use a variant) but this...

    Dim lngCount As Variant

    versus this...

    Dim lngCount As Long
    Last edited by pkstormy; 09-06-08 at 00:09.
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

  6. #6
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    DCount won't complain about the missing brackets... unless the fieldname has a space in it, it will be fine.
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  7. #7
    Join Date
    Sep 2008
    Posts
    20
    Guys can anybody post a database example? Cos i cant figure out the graffix one...

  8. #8
    Join Date
    Aug 2006
    Posts
    559
    8thStudios,

    If you bypass the security in mine, using the shift key, you just need to open the frmUserLogon. After this form is open, view it in design view and look at the code behind the "OK" command button's 'on-click' event. That checks for a user name, password, and then on the form's "On Close" event the code below is ran for a query called : qryReminders.

    The SQL statement for the qryReminders is:

    SELECT tblTask.Task_ID, tblTask.TaskDescription, DateDiff("d",[DateOriginated],Date()) AS DaysSinceOriginated, tblTask.DateOriginated, tblTask.Status
    FROM tblTask
    WHERE (((DateDiff("d",[DateOriginated],Date()))>=7) AND ((tblTask.Status)<>'Closed'))
    ORDER BY tblTask.Task_ID;


    This looks for the date difference of 7 days prior to the current date and then after the user successfully logs into the database, it asks them a question saying, "There are X-number of over-due Tasks, would you like to view them now?" If the user says "Yes", it opens the frmReminders, if the user does not want to view them, it just sends them to the frmMainMenu.

    Let me know if you need more clarification or help. You could also post a copy of your DB and I'll try to work on it to incorporate a similar reminder if you give me the criteria you want it based off of.

  9. #9
    Join Date
    Sep 2008
    Posts
    20
    Quote Originally Posted by Grafixx01
    8thStudios,

    If you bypass the security in mine, using the shift key, you just need to open the frmUserLogon. After this form is open, view it in design view and look at the code behind the "OK" command button's 'on-click' event. That checks for a user name, password, and then on the form's "On Close" event the code below is ran for a query called : qryReminders.

    The SQL statement for the qryReminders is:

    SELECT tblTask.Task_ID, tblTask.TaskDescription, DateDiff("d",[DateOriginated],Date()) AS DaysSinceOriginated, tblTask.DateOriginated, tblTask.Status
    FROM tblTask
    WHERE (((DateDiff("d",[DateOriginated],Date()))>=7) AND ((tblTask.Status)<>'Closed'))
    ORDER BY tblTask.Task_ID;


    This looks for the date difference of 7 days prior to the current date and then after the user successfully logs into the database, it asks them a question saying, "There are X-number of over-due Tasks, would you like to view them now?" If the user says "Yes", it opens the frmReminders, if the user does not want to view them, it just sends them to the frmMainMenu.

    Let me know if you need more clarification or help. You could also post a copy of your DB and I'll try to work on it to incorporate a similar reminder if you give me the criteria you want it based off of.
    Now i grabbed a better look at what should i do cos i was so confused! mate, the sample you uploaded for me is a shrine of details and im studying it very very carfully cos its full of resources. Hope this doesnt mind

    Cheers Grafixx and big thanks for your time

  10. #10
    Join Date
    Aug 2006
    Posts
    559
    Quote Originally Posted by 8thstudios
    Now i grabbed a better look at what should i do cos i was so confused! mate, the sample you uploaded for me is a shrine of details and im studying it very very carfully cos its full of resources. Hope this doesnt mind

    Cheers Grafixx and big thanks for your time

    No problem. Glad to help. Post back if you need more help and I'll try to help you out as best I can with the knowledge that I have!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •