Results 1 to 5 of 5
  1. #1
    5 Star Lounger
    Join Date
    Feb 2001
    Location
    Louisville, Kentucky, USA
    Posts
    605
    Thanks
    0
    Thanked 0 Times in 0 Posts

    No Info To Post (2000)

    [Good Morning,

    Yesterday, Hans was Superb in helping me with this but I've come across a few dilema's and was hoping someone could point me in the right direction.

    His suggestion works perfectly. It was my NOT thinking ahead...that has brought on the delima's.

    1. If there aren't any records that require a FollowUp, then I don't want the msg to pop up...and it does....if the main tbl (tlbInitialTable) identifies the userID and the user logs on...but the tbl doesn't have any records for that USERID, then NO MSG, but if the tbl has records, but there aren't any records requiring FollowUp a msg pops up anyway but the rpt is empty.

    2. If the user who needs to FOLLOWUP on a project just reviews the report but doesn't take any action, I would like the POPUP to continue until a FOLLOWUP COMPLETE is checked.

    Hope this made sense, of course it did to me...I'm the one with the problem...LOL

    At any rate, thanks.

    Here is the link to the previous post and solution....and again many many thanks to Hans for the yesterday's solution.
    <post#=287678>post 287678</post#>
    Roberta Price <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16>

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: No Info To Post (2000)

    Hi Roberta,

    You will need to add a Followup Completed field (type Yes/No) to tblInitialTable, if you haven't done that already.

    Change the line that opens the recordset as follows:

    strSQL = "SELECT * FROM tblInitialTable WHERE UserID = " & Me.UserID & " And " & _
    "[Followup Completed] = False And [Due Date] - [Follow Up Calculator] >= Date()"

    This puts all conditions in the recordset:
    - check for UserID
    - check that [Followup Completed] is false
    - check that [Due Date] is [Follow Up Calculator] days or less from today. The > = (without space) ensures that the reminder will be repeated.

    If not all conditions are met, the recordset is empty and no message pops up. since the check for the date is already performed in the recordset, you shouldn't test for it in the While loop. So replace

    If dtePresent = dteDateDue - intNotify Then
    ...
    End If

    by just the instruction in between:

    strReminder = strReminder & vbCrLf & "Project " & strProject & _
    " is due at " & dteDateDue

    HTH

  3. #3
    5 Star Lounger
    Join Date
    Feb 2001
    Location
    Louisville, Kentucky, USA
    Posts
    605
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: No Info To Post (2000)

    Hans,

    Thanks once again....however, I've been testing and it's still not working....

    I think the issue is here.....

    strSQL = "SELECT * FROM tblInitialTable WHERE UserID = " & Me.txtUserID & " And " & _
    "[FollowUpComplete] = False And [Due Date] - [Follow Up Calculator] >= Date()"

    The first statement CAN be TRUE/FALSE-----------therefore return a value
    The second CAN be TRUE/FALSE--------------------therefore return a value
    But the third CAN only be TRUE TODAY..the third statement requires >=....after TODAY.....it will never be > or = to TODAY.....therefore failing to return a reminder....am I missing something? most probably...

    At any rate, for testing...if I put 9/25 (Due Date) and 30 days (Follow Up Calculator) and False for FollowUp Complete, I get a message, If I put 9/24, 30 and False, NO MSG.
    Thanks.
    Roberta Price <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16>

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: No Info To Post (2000)

    Sorry, >= should have been <=. Brain failure <img src=/S/newbrain.gif border=0 alt=newbrain width=21 height=22>

  5. #5
    5 Star Lounger
    Join Date
    Feb 2001
    Location
    Louisville, Kentucky, USA
    Posts
    605
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: No Info To Post (2000)

    Thanks...that fixed it!!!! the only thing I didn't test...
    Roberta Price <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16>

Posting Permissions

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