We help IT Professionals succeed at work.

Add a search function to a vb6 reminder program re Q28910123 using vb6

isnoend2001
isnoend2001 asked
on
228 Views
Last Modified: 2016-01-19
i have a reminder program that has a mshflexgrid and want to be able to search the mshflexgrid using different terms
how to do this ?
28910123g.zip
Comment
Watch Question

Martin LissProtect yourself and your loved ones. Stay home for the holidays.
CERTIFIED EXPERT
Most Valuable Expert 2017
Distinguished Expert 2018

Commented:
OK, I'm on it.

Author

Commented:
ok thanks
Martin LissProtect yourself and your loved ones. Stay home for the holidays.
CERTIFIED EXPERT
Most Valuable Expert 2017
Distinguished Expert 2018

Commented:
Try this:
Included are:
Added a new Seach function
Changed code so that all reminders with notifications for today or a due date of today, both date-based and time-based, show up on one the "Alerts for Today" (changed name back because it's all one now), and fixed an oversight that caused  one-time date reminders to be ignored. For one-time dates also added an emphasis color of orange if they are 1 day overdue and red if more than that.
Removed basPublicArrays since it wasn't being used
Restored some lost code from Q28899179. Without it the grid wasn't being sorted correctly
Fixed a bug(?) which caused mbGridIsDirty to be set to True when loading the data
gridMaster used to change it's width depending on whether there was more or less than 15 rows. Changed it so that the  grid keeps a constant width while the description row start out a little wider than it was before and gets a litte smaller when the scrollbar is present.

How to use Search
1.    Click the new "Search" button in the "Reminders" frame on frmReminder and new frmSearch will appear
2.    At the bottom you'll find two sets of option buttons and a textbox. Each of the items has its own tooltiptext that explains its function. So if you wanted to find all the reminders that have "birthday" in the reminder name and you want to look in both active and deleted reminders, you would choose "Both" under "Reminder Status" and "Reminder Name" under "Where in Reminder" and enter "birthday" (case doesn't matter) in the "What to search for" textbox, and click "Search".

Note that you could have entered "bir" and you would have found all the names that contained "bir" including "birthday", "birth" and "birch", etc. You can also enter a wildcard character in the textbox. So if you wanted to find anything that contains "bi" followed by "y" you would enter "bi*y"

Don't use quotes in the textbox.
28914704.zip

Author

Commented:
i have been doing some testing and maybe i should not be using a earlier version of Flexgrid.dat
past duein the below should Jessicas Birthday be red ?
red
Martin LissProtect yourself and your loved ones. Stay home for the holidays.
CERTIFIED EXPERT
Most Valuable Expert 2017
Distinguished Expert 2018

Commented:
maybe i should not be using a earlier version of Flexgrid.dat
If you were using an outdated version of the dat file the app would tell you.

should Jessicas Birthday be red ?
No. I only color one-time overdue reminders since recurring reminders can't be overdue.

Author

Commented:
No. I only color one-time overdue reminders since recurring reminders can't be overdue.
that is not correct there are daily,weekly,monthly, and yearly if not marked as completed then each need to be red until done.when done weekly will be added a week to the due date, same with month and year
Martin LissProtect yourself and your loved ones. Stay home for the holidays.
CERTIFIED EXPERT
Most Valuable Expert 2017
Distinguished Expert 2018

Commented:
We don't have any method that I know of for marking recurring reminders as complete and if we did and say we had a daily reminder, how would you indicate that it was complete and would you really want to force your user to take some action every day? I mean they already see it in gridMaster and they will see it every day in the Alerts form; that should be enough.

BTW ion a different subject if you happen to have just one reminder due on any given day and that reminder is time based you'll get something like this.
bugYou can correct that in the Timer1 code by adding lines 6 and 13.
                    ' It's time-based
                    If .TextMatrix(lngReminder, GRD_NOTIFICATIONS) <> "" Then
                        If AddToAlertsTime(lngReminder, .TextMatrix(lngReminder, GRD_NOTIFICATIONS)) Then
                            frmNotifcation.AddTask = .TextMatrix(lngReminder, GRD_REMINDER_DESC)
                            frmNotifcation.AddDate = .TextMatrix(lngReminder, GRD_TIME_DATE)
                            bAdded = True
                        End If
                    Else
                        ' No notifications. Just alert without any further checking
                        ' since they'er always for today
                        frmNotifcation.AddTask = .TextMatrix(lngReminder, GRD_REMINDER_DESC)
                        frmNotifcation.AddDate = .TextMatrix(lngReminder, GRD_TIME_DATE)
                        bAdded = True
                    End If

Open in new window

Author

Commented:
I have found this so far
i remember early on asking how to handle daily ampm times
daily time value if the task is done then put the date into the last column (Hidden)(col 8)

if the time  is due and done put the date done into the last column (Hidden)
if the reminder never gets marked as done after the day changes then dismiss the notification
the only difference between a repeating date and non repeating date is how the reminder  is marked when done
week, add a week
month, add a month
year, add a year
no repeat,; removed from the grid

still checking
Martin LissProtect yourself and your loved ones. Stay home for the holidays.
CERTIFIED EXPERT
Most Valuable Expert 2017
Distinguished Expert 2018

Commented:
Tell me what I should do for a Daily reminder.

Also I was about to say that when a time based alert comes due that frmDeferTime would show up, but in testing just now I found the reason that the "lost code" that I mentioned in my first post here happened and that was because column 8 in the dat file was mistakenly used for two different purposes; store the delay time that results from showing frmDeferTime and a value used to sort the grid. I'll fix that now.

Author

Commented:
Tell me what I should do for a Daily reminder.

need a way to bug user to either do the reminder and dismiss it or keep bugging them until they do.
forgot to ask my sisters son what happens if the red button is never pressed saying "Its 9:00AM take  your medicine" my cell phone beeps when i miss a call for a while, but stops
Only thing i can think is have the form keep popping up every so often with a beep. until the date changes. if marked done then put todays date into the hidden column to stop reminders
what would you suggest ?
Protect yourself and your loved ones. Stay home for the holidays.
CERTIFIED EXPERT
Most Valuable Expert 2017
Distinguished Expert 2018
Commented:
This problem has been solved!
(Unlock this solution with a 7-day Free Trial)
UNLOCK SOLUTION

Author

Commented:
ok i will not force the daily issue
the day it's due 01-16-2016 when marked as done 01-23-2016 add a week
the search works fine
Martin LissProtect yourself and your loved ones. Stay home for the holidays.
CERTIFIED EXPERT
Most Valuable Expert 2017
Distinguished Expert 2018

Commented:
So, just to confirm, you want the 01-16-2016 Time/Date changed to 01-23-2016 on 01-16-2016 12:01AM.

Author

Commented:
no
So, just to confirm, you want the 01-16-2016 Time/Date changed to 01-23-2016 on 01-16-2016 12:01AM.
never want a time am/pm time in a date reminder
weekly reminder due  date =   01-16-2016  when marked as done weekly reminder due  date will add 1 week and be 01-23-2016 eg
date 01-16-2016
date = DateAdd("ww", 1, mydate) add a week
date will then read  01-23-2016
Martin LissProtect yourself and your loved ones. Stay home for the holidays.
CERTIFIED EXPERT
Most Valuable Expert 2017
Distinguished Expert 2018

Commented:
never want a time am/pm time in a date reminder
Sorry for the confusion but I didn't mean to imply that I would put a time in a date reminder. I was just trying to ask you when you want the date changed on 1/16. I'm suggesting that it be done at 12:01 AM on the 16th. I assume that's what you want but please confirm.

Author

Commented:
As far as i can tell only 2 ways to change a weekly date/ due time
1. A week goes by without the reminder being marked as done
2.the reminder gets marked as done
yes 12:01 AM looks like a good time for it to changeit if not marked as done
if marked as done it will be the when done
Martin LissProtect yourself and your loved ones. Stay home for the holidays.
CERTIFIED EXPERT
Most Valuable Expert 2017
Distinguished Expert 2018

Commented:
I will change it at 12:01 AM but as I said previously there's no way to mark it as done.

Author

Commented:
we need a way to mark a reminder as done
Martin LissProtect yourself and your loved ones. Stay home for the holidays.
CERTIFIED EXPERT
Most Valuable Expert 2017
Distinguished Expert 2018

Commented:
Why?

Author

Commented:
so you don,t get reminded to do something that has already been done
Martin LissProtect yourself and your loved ones. Stay home for the holidays.
CERTIFIED EXPERT
Most Valuable Expert 2017
Distinguished Expert 2018

Commented:
We have a way to mark one-time reminders as done and that happens when frmDeferTime is shown.  Recurring reminders are never done until the user deletes them from the grid. Anything else gets back to the discussion we had about bugging the user.

Author

Commented:
i got to thinking about deleting reminders by clicking the x on the row to delete.
if a daily,weekly, monthly or yearly repeating then
Msgbox "Do you want to  repeat Next Week ? ' cliick yes"
To Delete forever click no

Msgbox "Do you want to  repeat Next Month ? ' cliick yes"
To Delete forever click no

Msgbox "Do you want to  repeat Next Year ? ' cliick yes"
To Delete forever click no
Martin LissProtect yourself and your loved ones. Stay home for the holidays.
CERTIFIED EXPERT
Most Valuable Expert 2017
Distinguished Expert 2018

Commented:
Given a reminder named "Put out garbage" It would already say "Do you want to delete the reminder named 'Put out garbage'" and surely they can figure out that if they say yes that it wouldn't be repeated next week, but if you want to change it we can talk about it some other time.

I any case here's an update that fixes some things including:
The GRD_DELAY column was being used for two conflicting purposes; to hold the delay time and to hold the value used to sort the grid. To correct that I changed the name of that column from GRD_DELAY to GRD_SORT, changed GRD_DELAY to GRD_SORT in the code where appropriate, and added code to convert a version 1 dat file to version 2 which adds a new blank column at the end to hold the delay value. The conversion happens silently when you open the app.
Added code so that after frmDeferTime is shown that the Time/Date value is updated
Added code so that the Time/Date is updated when the due date for a date-based reminder is reached.
28914704a.zip

Author

Commented:
Given a reminder named "Put out garbage" It would already say "Do you want to delete the reminder named 'Put out garbage'" and surely they can figure out that if they say yes that it wouldn't be repeated next week, but if you want to change it we can talk about it some other time.

yes we need a way to completely remove a repeating reminder. like my sisters birthday

i will check out your fixes

Author

Commented:
most of the items on this list are not due
today alerts
Martin LissProtect yourself and your loved ones. Stay home for the holidays.
CERTIFIED EXPERT
Most Valuable Expert 2017
Distinguished Expert 2018

Commented:
I suspect that all of them from "Judys birthday" to "product support" have notifications. That's why they don't say"Today"; in other words they're not due today.

Author

Commented:
; in other words they're not due today.

at the top of the form is says'" Alerts for today" only alerts for today should be on the list
Martin LissProtect yourself and your loved ones. Stay home for the holidays.
CERTIFIED EXPERT
Most Valuable Expert 2017
Distinguished Expert 2018

Commented:
No, no, no. We've talked about this many times. The purpose of the notifications is to give us the ability (in a controlled fashion) to alert the user about upcoming events and the Alerts for today is the way that's done.

Author

Commented:
I think the forms title is misleading "Alerts For Today"
should be "Upcoming Alerts" or only show Actual alerts that are due for today
Martin LissProtect yourself and your loved ones. Stay home for the holidays.
CERTIFIED EXPERT
Most Valuable Expert 2017
Distinguished Expert 2018

Commented:
I'll change the title in the next question, but because "alerts" are.notifications of upcoming reminders and not the reminders themselves which is what "Upcoming Alerts" implies to me, how about "Upcoming Activities" instead?

Author

Commented:
I think Upcoming Reminders would be best
Martin LissProtect yourself and your loved ones. Stay home for the holidays.
CERTIFIED EXPERT
Most Valuable Expert 2017
Distinguished Expert 2018

Commented:
OK

Author

Commented:
Don't see a need for the alerts for today. Half of the items on the list are over 6 months in the future.
Having this is confusing to me. if the list only listed reminders due in the next few days, i could understand.  Am i missing something ?
alerts
Martin LissProtect yourself and your loved ones. Stay home for the holidays.
CERTIFIED EXPERT
Most Valuable Expert 2017
Distinguished Expert 2018

Commented:
Yes you are. You are seeing things 6 months in the future because you, as a user, made the choice to add a notification for 6 months in the future and you can (via View) change or delete that notification setting. If it were me I would for example, set my notification for Mellissas birthday to be 2 weeks before and then I wouldn't see the alert until June 20th. Or I might set two notifications for Mellissas birthday,  one 2 weeks before and one 3 days before and then I'd get one alert on June 20th and a second on July 1st.

Author

Commented:
I know i never set any notifications for 6 months. maybe 6 days at the most
i will delete them all and reenter them and put the notification into the description. the see what happens
Martin LissProtect yourself and your loved ones. Stay home for the holidays.
CERTIFIED EXPERT
Most Valuable Expert 2017
Distinguished Expert 2018

Commented:
Before you do could you attach your dat file?

Author

Commented:
Too late started doing it and ran into another issue. did this:
deleted a reminder by clicking the X on the row noticed that the deleted reminder was still in the grid
sometimes mulitiple times.
look at Jessica Died and Renew system mechanic
duplicates
Martin LissProtect yourself and your loved ones. Stay home for the holidays.
CERTIFIED EXPERT
Most Valuable Expert 2017
Distinguished Expert 2018

Commented:
I have no idea what you did. I tried two things
1) Deleted a reminder and it disappeared from the grid. Closed the app and reopened and it was still gone.
2) Deleted a reminder and it disappeared from the grid. I then added another,similar, one and it showed up in the grid. Closed the app and reopened and the first one was still gone and the second one still there.
Martin LissProtect yourself and your loved ones. Stay home for the holidays.
CERTIFIED EXPERT
Most Valuable Expert 2017
Distinguished Expert 2018

Commented:
Did you close the app using the End button in the IDE?

Author

Commented:
Did you close the app using the End button in the IDE?

not between deletions and adding new
Martin LissProtect yourself and your loved ones. Stay home for the holidays.
CERTIFIED EXPERT
Most Valuable Expert 2017
Distinguished Expert 2018

Commented:
You're going to have to try to reproduce it and tell me step by step how it happens.

Author

Commented:
ok i will try

Author

Commented:
i deleted the duplicates and reopened and got this:

alerts
Martin LissProtect yourself and your loved ones. Stay home for the holidays.
CERTIFIED EXPERT
Most Valuable Expert 2017
Distinguished Expert 2018

Commented:
Attach the dat file.

Author

Commented:
found the dat file
FlexGrid.txt
Martin LissProtect yourself and your loved ones. Stay home for the holidays.
CERTIFIED EXPERT
Most Valuable Expert 2017
Distinguished Expert 2018

Commented:
Rename your dat file and start the app again. I think that's what you need to do because I copied all the information about your Renew Tracphone minutes reminder from your dat file (except for the file name) and pasted it into my data file replacing the data for one of my "1d" reminder. When the arlert report ran I got the following and you'll see that that reminder didn't show up.
alertsIn case you might think my notification settings for the reminder are wrong, here's what they look like (which should be the same as yours since I copied your data). Note that the Reminder Details are probably different since they come from my rtf file.
reminder details
Martin LissProtect yourself and your loved ones. Stay home for the holidays.
CERTIFIED EXPERT
Most Valuable Expert 2017
Distinguished Expert 2018

Commented:
See the above post. If you do delete your dat and start from scratch with a new one, make sure you change the last run date in the ini file so you can see what if anything come up in the alert form.

Author

Commented:
I started making a new dat file from scratch and entering the 2nd item the entry date is the same as the due date
entry datehow could this happen ?
Martin LissProtect yourself and your loved ones. Stay home for the holidays.
CERTIFIED EXPERT
Most Valuable Expert 2017
Distinguished Expert 2018

Commented:
I have no idea my friend. I deleted my dat file and added these two reminders that are similar to yours without any problem.
OK

Author

Commented:
I found how it happened i clicked weekly 2 times and the calendar showed 2 times i selected 01-19-2016 2 times
Martin LissProtect yourself and your loved ones. Stay home for the holidays.
CERTIFIED EXPERT
Most Valuable Expert 2017
Distinguished Expert 2018

Commented:
Good detective work! I'll make sure that the calendar can't be clicked twice in the next new question.

Author

Commented:
Created a new dat file from scratch added 11 items and got this
alertsalso changed the date in the ini file

Author

Commented:
I think only the last 2 items should be on the alert list
Martin LissProtect yourself and your loved ones. Stay home for the holidays.
CERTIFIED EXPERT
Most Valuable Expert 2017
Distinguished Expert 2018

Commented:
Can I see that dat file? You can copy/paste it here instead of attaching it if you like.

Author

Commented:
12,11,2
"","Entry Date","Reminder Description","Time/Date","Reminder Type","Next Reminder","Open","Delete","Sort","Notifications","Delay"
"1d20160116131459.rtf","01-16-2016","Product support ends paquet builder","01-17-2016","No Repeat","11 Hours","View","X","660","",""
"Wk20160116131613.rtf","01-19-2016","put out garabage to curb","01-19-2016","Weekly","2 Days","View","X","2880","",""
"1d20160116132218.rtf","01-16-2016","Renew add on website","02-20-2016","No Repeat","34 Days","View","X","48960","",""
"Yr20160116132338.rtf","01-16-2016","Nickys Birthday notify 8 days","03-10-2016","Yearly","53 Days","View","X","76320","8:0|:-1|:-1",""
"Yr20160116132459.rtf","01-16-2016","Robbys Birthday notify 8 days","06-23-2016","Yearly","158 Days","View","X","227520","8:0|:-1|:-1",""
"Yr20160116132606.rtf","01-16-2016","Melissas Birthday notify 8 days","07-04-2016","Yearly","169 Days","View","X","243360","8:0|:-1|:-1",""
"Yr20160116132734.rtf","01-23-2016","Sarahs birthday notify 8 days","07-26-2016","Yearly","191 Days","View","X","275040","8:0|:-1|:-1",""
"Yr20160116132932.rtf","01-16-2016","Jessica Died no notify","08-03-2016","Yearly","199 Days","View","X","286560","",""
"1d20160116133124.rtf","01-16-2016","Renew system mechanic notify 3 days","10-25-2016","No Repeat","282 Days","View","X","406080","3:0|:-1|:-1",""
"1d20160116133304.rtf","01-16-2016","renew Trach Phone minutes notify 8 days","12-23-2016","No Repeat","341 Days","View","X","491040","8:0|:-1|:-1",""
"Yr20160116133417.rtf","01-16-2016","jessicas birthday notify 3 days","01-10-2017","Yearly","359 Days","View","X","516960","3:0|:-1|:-1",""
Martin LissProtect yourself and your loved ones. Stay home for the holidays.
CERTIFIED EXPERT
Most Valuable Expert 2017
Distinguished Expert 2018

Commented:
The  "good" news is that using your Personal folders I got the same results as you. Now I need to figure out why.

Author

Commented:
I am glad
Martin LissProtect yourself and your loved ones. Stay home for the holidays.
CERTIFIED EXPERT
Most Valuable Expert 2017
Distinguished Expert 2018

Commented:
I found that problem. I swear I tested this but obviously not enough. I have some things to do so it may be tomorrow before produce a new release.

Author

Commented:
ok
Martin LissProtect yourself and your loved ones. Stay home for the holidays.
CERTIFIED EXPERT
Most Valuable Expert 2017
Distinguished Expert 2018

Commented:
For my future reference I believe there are 12 different reminder situations that I need to test. Let me know if I've overlooked any. The "SHOW" means that they should be in the Alerts

1.    A time-based reminder with notifications periods that don't match the current time
2.    A time-based reminder with notifications periods that don't match the current time but it's due now SHOW
3.    A time-based reminder with notifications periods that do match the current time SHOW

4.    A time-based reminder without notifications and it's due now SHOW
5.    A time-based reminder without notifications and it's not due now

6.    A date-based reminder with notifications periods that don't match the current date
7.    A date-based reminder with notifications periods that don't match the current date but it's due now SHOW
8.    A date-based reminder with notifications periods that do match the current date SHOW

9.    A date-based reminder without notifications and it's due now SHOW
10.    A date-based reminder without notifications and it's not due now

11.    A "1d" (one time) date-based reminder with no notifications that's overdue SHOW (with color)
12.    A "1d" (one time) date-based reminder with notifications that's overdue SHOW (with color)

Author

Commented:
Can't think of any, but am trying to recreate the duplicates when deleting and adding new.
Have not tried this yet:
user creates a one time date reminder 3 days from today and then clicks add notifation.
Only days should be in the combo and limited to 2 days, entering 3 days it would be due now
and should not be allowed. entering 4 or more and it would be past due.
i will let you know the steps when i create duplicates
Martin LissProtect yourself and your loved ones. Stay home for the holidays.
CERTIFIED EXPERT
Most Valuable Expert 2017
Distinguished Expert 2018

Commented:
The notifications are days, weeks, etc before the reminder's due date so entering 4 or more would only mean that the reminder would show up in the alerts 4 or more days, weeks, etc before the due date.

Author

Commented:
yes, but if the due date was in 3 days and notification was 4 days then it should not be allowed that would mean the notification would show up yesterday.
Martin LissProtect yourself and your loved ones. Stay home for the holidays.
CERTIFIED EXPERT
Most Valuable Expert 2017
Distinguished Expert 2018

Commented:
If you create a reminder for Jan 19th (3 days from now) and you set up a notification for 4 days prior then that notification would never show up and I believe that is what you are saying. I can add validation for that but not now since it doesn't hurt anything. I make a note to myself to do it.

Author

Commented:
ok

Author

Commented:
Ran into somethig strange
Clicked view
viewthis opened and entries don't match
don't matchthen when clicking the X to close the form got this
invalid entryonly way to get to frmReminder was to click Cancel
Martin LissProtect yourself and your loved ones. Stay home for the holidays.
CERTIFIED EXPERT
Most Valuable Expert 2017
Distinguished Expert 2018

Commented:
I believe that one or more of your files became corrupted on or before the 8th. I say that because when I open one of your Paquet builder deleted rtf files using Word I see this.
Corrupt
And about the "Period before..." error message, let me know if you don't understand why it was generated.

Author

Commented:
And about the "Period before..." error message, let me know if you don't understand why it was generated.
i had one  notification set ,but clicking view it wanted a second notification, why?
Martin LissProtect yourself and your loved ones. Stay home for the holidays.
CERTIFIED EXPERT
Most Valuable Expert 2017
Distinguished Expert 2018

Commented:
The error happened I believe because your file is corrupt and what I was trying to do was to find out if you understood the meaning of the error message itself.
Martin LissProtect yourself and your loved ones. Stay home for the holidays.
CERTIFIED EXPERT
Most Valuable Expert 2017
Distinguished Expert 2018

Commented:
I just realized that notifications for time alerts don't make sense. The purpose of the "Alerts for Today" report is to display the reminders that are either due today or some day in the future if a notification has been set up to do that. The Alerts run once a day (you should use Options to set the time to early morning) and it makes sense to look for date-based notifications so the user can be notified of a future reminder if he likes, but since, at least for now, time alerts are always for today, they should show up in the alerts with or without notifications. So I'm going to delete the ability to add notifications to time reminders unless you can give me a reason not to.

Author

Commented:
if a person really wanted a notification they could make another reminder just for the notification.
I say remove the ability
Martin LissProtect yourself and your loved ones. Stay home for the holidays.
CERTIFIED EXPERT
Most Valuable Expert 2017
Distinguished Expert 2018

Commented:
OK so the cases are now
1.    A time-based reminder. They are always for today. SHOW
2.    A date-based reminder with notifications periods that don't match the current date
3.    A date-based reminder with notifications periods that don't match the current date but it's due now SHOW
4.    A date-based reminder with notifications periods that do match the current date SHOW
5.    A date-based reminder without notifications and it's due now SHOW
6.    A date-based reminder without notifications and it's not due now
7.    A "1d" (one time) date-based reminder with no notifications that's overdue SHOW (with color)
8.    A "1d" (one time) date-based reminder with notifications that's overdue SHOW (with color)

Author

Commented:
ok

Author

Commented:
found another bug
to recreate choose any date in column 3,
change the date with the calendar
now click New
select a one time date this error pops up
mismatchin frmCalendar this code is highlighted
vberror
Martin LissProtect yourself and your loved ones. Stay home for the holidays.
CERTIFIED EXPERT
Most Valuable Expert 2017
Distinguished Expert 2018

Commented:
This release includes:

Changed the name of the "Alerts for Today"  to "Upcoming Reminders"
Realized that notifications for time-based alerts don't make  sense (at least when there's no separate process for showing them in their own form with their own timing) so I removed them
At least one type of reminder was not showing up in "Upcoming Reminders" and the section of code that dealt with showing them was hard to follow so I rewrote it
Added two notification validations. One to validate the number of days represented by the period type times the number of periods does not exceed 6, 27 or 364 depending on the reminder type (e.g. a notificaton can not be 8 days prior to a weekly reminder), and a second for one-time date reminders  to make sure that (the date of the reminder) - ((the number of days represented by period type) times (the number of periods)) is not prior ro today (e.g. a reminder that's due 3 days from now can not have a notification for 1 week before since that would be prior to today). (See the note that follows)
Corrected a bug where while View-ing a reminder if the name was deleted or made less than 4 characters you could then change the reminder type.
Corrected a bug where clicking the reminder type dropdown twice executed some existing code that set the entry date to the date chosen from the calendar.
Corrected a bug where after clicking column 3 in the grid and changing the date, creating a new reminder caused a "Type mismatch" error to occur because frmCalendar.GridDate wasn't being set to a valid value.

Note:  A notification for a recurring reminder can be before today, because if for example it is the 6/15 and the reminder is a monthly one and it is set to start on 7/16 then it is perfectly valid to set a notification to occur 3 days prior to the date since it needs to happen next month on 7/13.
28914704b.zip

Author

Commented:
Thanks Martin Liss
should i create a new dat file ?
using the prev release i get this:
 alerts
Martin LissProtect yourself and your loved ones. Stay home for the holidays.
CERTIFIED EXPERT
Most Valuable Expert 2017
Distinguished Expert 2018

Commented:
No you don't need a new one

Author

Commented:
then why is there so much in the far future most are
Martin LissProtect yourself and your loved ones. Stay home for the holidays.
CERTIFIED EXPERT
Most Valuable Expert 2017
Distinguished Expert 2018

Commented:
Attach your dat file.
Martin LissProtect yourself and your loved ones. Stay home for the holidays.
CERTIFIED EXPERT
Most Valuable Expert 2017
Distinguished Expert 2018

Commented:
Replace your timer code with this. Lines 196 and 206 were added.
Private Sub Timer1_Timer()
'******* Q28903587C Start *******
'Static dteTimeRun As Date
' The timer runs every 10 seconds so we can't easily check
' for a time down to the exact second so this compares the
' current day with the last day it ran and exits if it's
' the same day.
'If DateDiff("d", dteTimeRun, Date) = 0 Then
'    Exit Sub
'End If

Dim lngReminder As Long
Dim frm As Form
'******* Q28905119A Start *******
Dim fName As String
Dim strTime As String
'******* Q28914704I Start *******
Dim strName As String
Dim strType As String
'******* Q28914704I End *********
'******* Q28905119A End *********
'******* Q28910123I Start *******
Static bAdded As Boolean
Static intDayShown As Integer
'******* Q28914704A Start *******
'Static strTimeShown As String
'******* Q28914704A End *********
'******* Q28910123I End *********

With gridMaster
    For lngReminder = 1 To .Rows - 1
        If InStr(1, .TextMatrix(lngReminder, GRD_TIME_DATE), "M") > 0 Then
            ' It's a time reminder
            If .TextMatrix(lngReminder, GRD_DELAY) = "" Then
                ' It has not been delayed and it's time has come due
                If DateDiff("s", .TextMatrix(lngReminder, GRD_TIME_DATE), Format(Now, "short time")) = 0 Then
                    frmDeferTime.ReminderRow = lngReminder
                    frmDeferTime.Show vbModal
                    '******* Q28914704H Start *******
                    SaveData gridMaster
                    '******* Q28914704H End *********
                    '******* Q28905119A Start *******
                    'Exit Sub
                    '******* Q28905119A End *********
                Else
                    ' It has not been delayed and it's time has not yet come due
                    .TextMatrix(lngReminder, GRD_NEXT_REMINDER) = DetermineNextTaskTime(.TextMatrix(lngReminder, GRD_TIME_DATE), _
                                                                  Left$(.TextMatrix(lngReminder, GRD_FILE_NAME), 2))
                End If
            Else
                ' It's been delayed and so the GRD_DELAY column contains a value
                ' that is either the current date or "Done" and the current date
                If Left$(.TextMatrix(lngReminder, GRD_DELAY), Len(DONE)) <> DONE Then
                    ' "Done" is not found so show the form if the difference
                    ' between the delay time and now is 0, otherwise don't do
                    ' anything with it until tomorrow when the GRD_DELAY column will be cleared
                    If DateDiff("s", .TextMatrix(lngReminder, GRD_DELAY), Format(Now, "mm/dd/yyyy h:mm AM/PM")) = 0 Then
                        frmDeferTime.ReminderRow = lngReminder
                        frmDeferTime.Show vbModal
                        SaveData gridMaster
                        '******* Q28905119A Start *******
                        'Exit Sub
                        '******* Q28905119A End *********
                    '******* Q28914704H Start *******
                    Else
                        .TextMatrix(lngReminder, GRD_DELAY) = ""
                    '******* Q28914704H End *********
                    End If
                End If
            End If
        Else
            '******* Q28914704I Start *******
'            .TextMatrix(lngReminder, GRD_NEXT_REMINDER) = DetermineNextTaskTime(.TextMatrix(lngReminder, GRD_TIME_DATE), _
'                                                          Left$(.TextMatrix(lngReminder, GRD_FILE_NAME), 2))
            If DateDiff("d", .TextMatrix(lngReminder, GRD_TIME_DATE), Now) > 0 Then
                ' Get the name without the .rtf, get the type (e.g."Wk") and get the due date
                strName = Split(.TextMatrix(lngReminder, GRD_FILE_NAME), ".")(0)
                strType = Left$(strName, 2)
                Select Case strType
                    Case "Wk"
                        .TextMatrix(lngReminder, GRD_TIME_DATE) = Format(DateAdd("ww", 1, .TextMatrix(lngReminder, GRD_TIME_DATE)), "mm-dd-yyyy")
                    Case "Mo"
                        .TextMatrix(lngReminder, GRD_TIME_DATE) = Format(DateAdd("m", 1, .TextMatrix(lngReminder, GRD_TIME_DATE)), "mm-dd-yyyy")
                    Case "Yr"
                        .TextMatrix(lngReminder, GRD_TIME_DATE) = Format(DateAdd("yyyy", 1, .TextMatrix(lngReminder, GRD_TIME_DATE)), "mm-dd-yyyy")
                End Select
                .TextMatrix(lngReminder, GRD_NEXT_REMINDER) = DetermineNextTaskTime(.TextMatrix(lngReminder, GRD_TIME_DATE), strType)
            End If
            '******* Q28914704I End *********
        End If
    Next
    '******* Q28905119A Start *******
    fName = gstrFactOptions & "\Options.ini"
    Set IniSettings = New cInifile
     
    With IniSettings
       .Path = fName
       .Section = "Notification Time"
       .Key = "Notify Time"
       strTime = .Value
    End With
    
    '******* Q28910123I Start *******
     ' Restrict to running just once a day
     If intDayShown <> Day(Now) Then
        bAdded = False
    '******* Q28910123I End *********
        '******* Q28910123L Start (rewrote section) *******
        ' The daily agenda ("Date Alerts for Today") is shown once a day at
        ' the time stored in the ini file and this time comparison checks the
        ' current time against the ini file time to see if it's the proper time
        ' to show it. The "or" ensures that the form will be show on the day
        ' that the app is restarted, even if it's past the ini time.
        If (Format(Now, "HH:MM:SS") >= Format(strTime, "HH:MM") & ":00" And _
           Format(Now, "HH:MM:SS") <= Format(strTime, "HH:MM") & ":10") _
                                Or _
                gdteLastRun <> Format(Now, "short date") Then
            '******* Q28914704A Start *******
'            For lngReminder = 1 To .Rows - 1
'                Select Case .TextMatrix(lngReminder, GRD_REMINDER_TYPE)
'                    Case "Daily", "No Repeat"
'                        ' These are time-based reminders so skip them
'                    Case Else
            ' Do backwards so that the Alerts come out shortest first
           
'==========================================================================================================================
'            There are 12 different reminder situations that need to be considered.
'            The "SHOW" means that they should be in the Alerts
'
'            1.  A time-based reminder. They are always for today. SHOW
'
'            2.  A date-based reminder with notifications periods that don't match the current date
'            3.  A date-based reminder with notifications periods that don't match the current date but it's due now SHOW
'            4.  A date-based reminder with notifications periods that do match the current date SHOW
'
'            5.  A date-based reminder without notifications and it's due now SHOW
'            6.  A date-based reminder without notifications and it's not due now
'
'            7.  A "1d" (one time) date-based reminder with no notifications that's overdue SHOW (with color)
'            8.  A "1d" (one time) date-based reminder with notifications that's overdue SHOW (with color)

'           To summarize, cases 1, 3, 4, 5, 7, and 8 should be shown, 2 and 6 should not.
'==========================================================================================================================
            '******* Q28914704N Start *******
            ' Rewrote this part
            For lngReminder = .Rows - 1 To 1 Step -1
                If InStr(1, .TextMatrix(lngReminder, GRD_TIME_DATE), "M") = 0 Then
                    ' It's a date-based reminder
                    If .TextMatrix(lngReminder, GRD_NOTIFICATIONS) <> "" Then
                        ' The date-based reminder has notifications
                        If AddToAlertsDate(lngReminder, .TextMatrix(lngReminder, GRD_NOTIFICATIONS)) Then
                            ' Add those reminders with notification periods that match today
                            frmNotifcation.AddTask = .TextMatrix(lngReminder, GRD_REMINDER_DESC)
                            If .TextMatrix(lngReminder, GRD_TIME_DATE) = Format(Now, "mm-dd-yyyy") Then
                                ' Case 3
                                frmNotifcation.AddDate = "Today"
                            Else
                                ' Case 4
                                frmNotifcation.AddDate = .TextMatrix(lngReminder, GRD_TIME_DATE)
                            End If
                            bAdded = True

                        Else
                            If .TextMatrix(lngReminder, GRD_TIME_DATE) = Format(Now, "mm-dd-yyyy") Then
                                ' Case 7
                                ' The date-based reminder has notifications that don't match today
                                ' but it's due today
                                frmNotifcation.AddTask = .TextMatrix(lngReminder, GRD_REMINDER_DESC)
                                bAdded = True
                                frmNotifcation.AddDate = "Today"
                            ElseIf Left(.TextMatrix(lngReminder, GRD_FILE_NAME), 2) = "1d" Then
                                ' Case 8
                                ' It's overdue.
                                Select Case DateDiff("d", .TextMatrix(lngReminder, GRD_TIME_DATE), Now)
                                    Case 1
                                        frmNotifcation.EmphasisColor = RGB(255, 140, 0) ' Orange
                                    Case Is > 0
                                        frmNotifcation.EmphasisColor = RGB(255, 0, 0) ' Red
                                End Select
                                frmNotifcation.AddTask = .TextMatrix(lngReminder, GRD_REMINDER_DESC)
                                frmNotifcation.AddDate = .TextMatrix(lngReminder, GRD_TIME_DATE)
                                bAdded = True
                           End If
                        End If
                    Else
                        ' It's a date-based reminder with no notifications
                         If .TextMatrix(lngReminder, GRD_TIME_DATE) = Format(Now, "mm-dd-yyyy") Then
                            ' Case 5
                            ' It's due today.
                            frmNotifcation.AddTask = .TextMatrix(lngReminder, GRD_REMINDER_DESC)
                            bAdded = True
                            frmNotifcation.AddDate = "Today"
                        Else
                            ' Case 7
                            ' It's a one-time date that's overdue.
                            If Left(.TextMatrix(lngReminder, GRD_FILE_NAME), 2) = "1d" Then
                                Select Case DateDiff("d", .TextMatrix(lngReminder, GRD_TIME_DATE), Now)
                                    Case 1
                                        frmNotifcation.EmphasisColor = RGB(255, 140, 0) ' Orange
                                    Case Is > 0
                                        frmNotifcation.EmphasisColor = RGB(255, 0, 0) ' Red
                                End Select
                                frmNotifcation.AddTask = .TextMatrix(lngReminder, GRD_REMINDER_DESC)
                                frmNotifcation.AddDate = .TextMatrix(lngReminder, GRD_TIME_DATE)
                                bAdded = True
                            End If
                        End If
                    End If
                Else
                    ' It's time-based so show it.
                    frmNotifcation.AddTask = .TextMatrix(lngReminder, GRD_REMINDER_DESC)
                    frmNotifcation.AddDate = .TextMatrix(lngReminder, GRD_TIME_DATE)
                    bAdded = True
                End If
            Next
            '******* Q28914704N End *********
            
            '******* Q28910123I Start *******
            If Not bAdded Then
                frmNotifcation.AddTask = "No alerts for today"
                frmNotifcation.AddDate = "N/A"
                intDayShown = Day(Now)
            '******* Q28914704N Start *******
            Else
                intDayShown = Day(Now)
            '******* Q28914704N End *********
            End If
            If Not gbAlertsNeedToBeShown Then
                intDayShown = Day(Now)
            End If
            '******* Q28910123I End *********
        End If
    '******* Q28910123I Start *******
    End If
    '******* Q28910123I End *********
   
    '******* Q28914704A Start *******
    ' Check time reminders
'    For lngReminder = 1 To .Rows - 1
'        Select Case .TextMatrix(lngReminder, GRD_REMINDER_TYPE)
'            Case "Daily", "No Repeat"
'                If strTimeShown <> .TextMatrix(lngReminder, GRD_TIME_DATE) Then
'                    If AddToAlertsTime(lngReminder, .TextMatrix(lngReminder, GRD_NOTIFICATIONS)) Then
'                        Set frm = New frmNotifcation
'                        frm.AddTask = .TextMatrix(lngReminder, GRD_REMINDER_DESC)
'                        frm.AddDate = .TextMatrix(lngReminder, GRD_TIME_DATE)
'                        ' Possibly show more than one instance of frmNotification
'                        strTimeShown = .TextMatrix(lngReminder, GRD_TIME_DATE)
'                        frm.ReportType = "Time"
'                        frm.Show
'                    End If
'            End If
'        End Select
'    Next
    '******* Q28914704A End *********
    '******* Q28905119A End *********
End With
'******* Q28903587C End *********
End Sub

Open in new window

Author

Commented:
If the first 4 items were not on the list. this would work
reminders

Author

Commented:
a thought only add items that are due in the next 5 days
next 5 days
would this help on not putting future old items on the list ?

Author

Commented:
i just added this:
 Caption = "Upcoming Reminders as of " & Format(Now, "ddd mm-dd-yyyy") & " In the next 5 days"
Martin LissProtect yourself and your loved ones. Stay home for the holidays.
CERTIFIED EXPERT
Most Valuable Expert 2017
Distinguished Expert 2018

Commented:
I'm embarrassed about all these problems, but that won't help. This will.
Private Sub Timer1_Timer()
'******* Q28903587C Start *******
'Static dteTimeRun As Date
' The timer runs every 10 seconds so we can't easily check
' for a time down to the exact second so this compares the
' current day with the last day it ran and exits if it's
' the same day.
'If DateDiff("d", dteTimeRun, Date) = 0 Then
'    Exit Sub
'End If

Dim lngReminder As Long
Dim frm As Form
'******* Q28905119A Start *******
Dim fName As String
Dim strTime As String
'******* Q28914704I Start *******
Dim strName As String
Dim strType As String
'******* Q28914704I End *********
'******* Q28905119A End *********
'******* Q28910123I Start *******
Static bAdded As Boolean
Static intDayShown As Integer
'******* Q28914704A Start *******
'Static strTimeShown As String
'******* Q28914704A End *********
'******* Q28910123I End *********

With gridMaster
    For lngReminder = 1 To .Rows - 1
        If InStr(1, .TextMatrix(lngReminder, GRD_TIME_DATE), "M") > 0 Then
            ' It's a time reminder
            If .TextMatrix(lngReminder, GRD_DELAY) = "" Then
                ' It has not been delayed and it's time has come due
                If DateDiff("s", .TextMatrix(lngReminder, GRD_TIME_DATE), Format(Now, "short time")) = 0 Then
                    frmDeferTime.ReminderRow = lngReminder
                    frmDeferTime.Show vbModal
                    '******* Q28914704H Start *******
                    SaveData gridMaster
                    '******* Q28914704H End *********
                    '******* Q28905119A Start *******
                    'Exit Sub
                    '******* Q28905119A End *********
                Else
                    ' It has not been delayed and it's time has not yet come due
                    .TextMatrix(lngReminder, GRD_NEXT_REMINDER) = DetermineNextTaskTime(.TextMatrix(lngReminder, GRD_TIME_DATE), _
                                                                  Left$(.TextMatrix(lngReminder, GRD_FILE_NAME), 2))
                End If
            Else
                ' It's been delayed and so the GRD_DELAY column contains a value
                ' that is either the current date or "Done" and the current date
                If Left$(.TextMatrix(lngReminder, GRD_DELAY), Len(DONE)) <> DONE Then
                    ' "Done" is not found so show the form if the difference
                    ' between the delay time and now is 0, otherwise don't do
                    ' anything with it until tomorrow when the GRD_DELAY column will be cleared
                    If DateDiff("s", .TextMatrix(lngReminder, GRD_DELAY), Format(Now, "mm/dd/yyyy h:mm AM/PM")) = 0 Then
                        frmDeferTime.ReminderRow = lngReminder
                        frmDeferTime.Show vbModal
                        SaveData gridMaster
                        '******* Q28905119A Start *******
                        'Exit Sub
                        '******* Q28905119A End *********
                    '******* Q28914704H Start *******
                    Else
                        .TextMatrix(lngReminder, GRD_DELAY) = ""
                    '******* Q28914704H End *********
                    End If
                End If
            End If
        Else
            '******* Q28914704I Start *******
'            .TextMatrix(lngReminder, GRD_NEXT_REMINDER) = DetermineNextTaskTime(.TextMatrix(lngReminder, GRD_TIME_DATE), _
'                                                          Left$(.TextMatrix(lngReminder, GRD_FILE_NAME), 2))
            If DateDiff("d", .TextMatrix(lngReminder, GRD_TIME_DATE), Now) > 0 Then
                ' Get the name without the .rtf, get the type (e.g."Wk") and get the due date
                strName = Split(.TextMatrix(lngReminder, GRD_FILE_NAME), ".")(0)
                strType = Left$(strName, 2)
                Select Case strType
                    Case "Wk"
                        .TextMatrix(lngReminder, GRD_TIME_DATE) = Format(DateAdd("ww", 1, .TextMatrix(lngReminder, GRD_TIME_DATE)), "mm-dd-yyyy")
                    Case "Mo"
                        .TextMatrix(lngReminder, GRD_TIME_DATE) = Format(DateAdd("m", 1, .TextMatrix(lngReminder, GRD_TIME_DATE)), "mm-dd-yyyy")
                    Case "Yr"
                        .TextMatrix(lngReminder, GRD_TIME_DATE) = Format(DateAdd("yyyy", 1, .TextMatrix(lngReminder, GRD_TIME_DATE)), "mm-dd-yyyy")
                End Select
                .TextMatrix(lngReminder, GRD_NEXT_REMINDER) = DetermineNextTaskTime(.TextMatrix(lngReminder, GRD_TIME_DATE), strType)
            End If
            '******* Q28914704I End *********
        End If
    Next
    '******* Q28905119A Start *******
    fName = gstrFactOptions & "\Options.ini"
    Set IniSettings = New cInifile
     
    With IniSettings
       .Path = fName
       .Section = "Notification Time"
       .Key = "Notify Time"
       strTime = .Value
    End With
    
    '******* Q28910123I Start *******
     ' Restrict to running just once a day
     If intDayShown <> Day(Now) Then
        bAdded = False
    '******* Q28910123I End *********
        '******* Q28910123L Start (rewrote section) *******
        ' The daily agenda ("Date Alerts for Today") is shown once a day at
        ' the time stored in the ini file and this time comparison checks the
        ' current time against the ini file time to see if it's the proper time
        ' to show it. The "or" ensures that the form will be show on the day
        ' that the app is restarted, even if it's past the ini time.
        If (Format(Now, "HH:MM:SS") >= Format(strTime, "HH:MM") & ":00" And _
           Format(Now, "HH:MM:SS") <= Format(strTime, "HH:MM") & ":10") _
                                Or _
                gdteLastRun <> Format(Now, "short date") Then
            '******* Q28914704A Start *******
'            For lngReminder = 1 To .Rows - 1
'                Select Case .TextMatrix(lngReminder, GRD_REMINDER_TYPE)
'                    Case "Daily", "No Repeat"
'                        ' These are time-based reminders so skip them
'                    Case Else
            ' Do backwards so that the Alerts come out shortest first
           
'==========================================================================================================================
'            There are 12 different reminder situations that need to be considered.
'            The "SHOW" means that they should be in the Alerts
'
'            1.  A time-based reminder. They are always for today. SHOW
'
'            2.  A date-based reminder with notifications periods that don't match the current date
'            3.  A date-based reminder with notifications periods that don't match the current date but it's due now SHOW
'            4.  A date-based reminder with notifications periods that do match the current date SHOW
'
'            5.  A date-based reminder without notifications and it's due now SHOW
'            6.  A date-based reminder without notifications and it's not due now
'
'            7.  A "1d" (one time) date-based reminder with no notifications that's overdue SHOW (with color)
'            8.  A "1d" (one time) date-based reminder with notifications that's overdue SHOW (with color)

'           To summarize, cases 1, 3, 4, 5, 7, and 8 should be shown, 2 and 6 should not.
'==========================================================================================================================
            '******* Q28914704N Start *******
            ' Rewrote this part
            For lngReminder = .Rows - 1 To 1 Step -1
                If InStr(1, .TextMatrix(lngReminder, GRD_TIME_DATE), "M") = 0 Then
                    ' It's a date-based reminder
                    If .TextMatrix(lngReminder, GRD_NOTIFICATIONS) <> "" Then
                        ' The date-based reminder has notifications
                        If AddToAlertsDate(lngReminder, .TextMatrix(lngReminder, GRD_NOTIFICATIONS)) Then
                            ' Add those reminders with notification periods that match today
                            frmNotifcation.AddTask = .TextMatrix(lngReminder, GRD_REMINDER_DESC)
                            If .TextMatrix(lngReminder, GRD_TIME_DATE) = Format(Now, "mm-dd-yyyy") Then
                                ' Case 3
                                frmNotifcation.AddDate = "Today"
                            Else
                                ' Case 4
                                frmNotifcation.AddDate = .TextMatrix(lngReminder, GRD_TIME_DATE)
                            End If
                            bAdded = True

                        Else
                            If .TextMatrix(lngReminder, GRD_TIME_DATE) = Format(Now, "mm-dd-yyyy") Then
                                ' Case 7
                                ' The date-based reminder has notifications that don't match today
                                ' but it's due today
                                frmNotifcation.AddTask = .TextMatrix(lngReminder, GRD_REMINDER_DESC)
                                bAdded = True
                                frmNotifcation.AddDate = "Today"
                            ElseIf Left(.TextMatrix(lngReminder, GRD_FILE_NAME), 2) = "1d" Then
                                ' Case 8
                                ' It's overdue.
                                Select Case DateDiff("d", .TextMatrix(lngReminder, GRD_TIME_DATE), Now)
                                    Case 1
                                        frmNotifcation.EmphasisColor = RGB(255, 140, 0) ' Orange
                                        frmNotifcation.AddTask = .TextMatrix(lngReminder, GRD_REMINDER_DESC)
                                        frmNotifcation.AddDate = .TextMatrix(lngReminder, GRD_TIME_DATE)
                                        bAdded = True
                                    Case Is > 0
                                        frmNotifcation.EmphasisColor = RGB(255, 0, 0) ' Red
                                        frmNotifcation.EmphasisColor = RGB(255, 140, 0) ' Orange
                                        frmNotifcation.AddTask = .TextMatrix(lngReminder, GRD_REMINDER_DESC)
                                        frmNotifcation.AddDate = .TextMatrix(lngReminder, GRD_TIME_DATE)
                                        bAdded = True
                                End Select
                           End If
                        End If
                    Else
                        ' It's a date-based reminder with no notifications
                         If .TextMatrix(lngReminder, GRD_TIME_DATE) = Format(Now, "mm-dd-yyyy") Then
                            ' Case 5
                            ' It's due today.
                            frmNotifcation.AddTask = .TextMatrix(lngReminder, GRD_REMINDER_DESC)
                            bAdded = True
                            frmNotifcation.AddDate = "Today"
                        Else
                            ' Case 7
                            ' It's a one-time date that's overdue.
                            If Left(.TextMatrix(lngReminder, GRD_FILE_NAME), 2) = "1d" Then
                                Select Case DateDiff("d", .TextMatrix(lngReminder, GRD_TIME_DATE), Now)
                                    Case 1
                                        frmNotifcation.EmphasisColor = RGB(255, 140, 0) ' Orange
                                        frmNotifcation.AddTask = .TextMatrix(lngReminder, GRD_REMINDER_DESC)
                                        frmNotifcation.AddDate = .TextMatrix(lngReminder, GRD_TIME_DATE)
                                        bAdded = True
                                    Case Is > 0
                                        frmNotifcation.EmphasisColor = RGB(255, 140, 0) ' Orange
                                        frmNotifcation.AddTask = .TextMatrix(lngReminder, GRD_REMINDER_DESC)
                                        frmNotifcation.AddDate = .TextMatrix(lngReminder, GRD_TIME_DATE)
                                        bAdded = True
                                        frmNotifcation.EmphasisColor = RGB(255, 0, 0) ' Red
                                End Select
                            End If
                        End If
                    End If
                Else
                    ' It's time-based so show it.
                    frmNotifcation.AddTask = .TextMatrix(lngReminder, GRD_REMINDER_DESC)
                    frmNotifcation.AddDate = .TextMatrix(lngReminder, GRD_TIME_DATE)
                    bAdded = True
                End If
            Next
            '******* Q28914704N End *********
            
            '******* Q28910123I Start *******
            If Not bAdded Then
                frmNotifcation.AddTask = "No alerts for today"
                frmNotifcation.AddDate = "N/A"
                intDayShown = Day(Now)
            '******* Q28914704N Start *******
            Else
                intDayShown = Day(Now)
            '******* Q28914704N End *********
            End If
            If Not gbAlertsNeedToBeShown Then
                intDayShown = Day(Now)
            End If
            '******* Q28910123I End *********
        End If
    '******* Q28910123I Start *******
    End If
    '******* Q28910123I End *********
   
    '******* Q28914704A Start *******
    ' Check time reminders
'    For lngReminder = 1 To .Rows - 1
'        Select Case .TextMatrix(lngReminder, GRD_REMINDER_TYPE)
'            Case "Daily", "No Repeat"
'                If strTimeShown <> .TextMatrix(lngReminder, GRD_TIME_DATE) Then
'                    If AddToAlertsTime(lngReminder, .TextMatrix(lngReminder, GRD_NOTIFICATIONS)) Then
'                        Set frm = New frmNotifcation
'                        frm.AddTask = .TextMatrix(lngReminder, GRD_REMINDER_DESC)
'                        frm.AddDate = .TextMatrix(lngReminder, GRD_TIME_DATE)
'                        ' Possibly show more than one instance of frmNotification
'                        strTimeShown = .TextMatrix(lngReminder, GRD_TIME_DATE)
'                        frm.ReportType = "Time"
'                        frm.Show
'                    End If
'            End If
'        End Select
'    Next
    '******* Q28914704A End *********
    '******* Q28905119A End *********
End With
'******* Q28903587C End *********
End Sub

Open in new window

In looking at your dat file I noticed that you have a few with 8 days notifications and a few with 4 day notifications even though in the descriptions some of them say "no remind". That's suspicious but I can't reproduce the problem if that's what it is. You can manually correct the data file and remove the unwanted reminders by backing it up first and then for example changing this

Yr20160117 071142.rtf","08-03-2016","Judys Birthday no remind","08-22-2016","Yearly","216 Days","View","X","311040","8:0|:-1|:-1",""

to this

Yr20160117 071142.rtf","08-03-2016","Judys Birthday no remind","08-22-2016","Yearly","216 Days","View","X","311040","",""

In other words carefully remove the 8:0|:-1|:-1 part, leaving the surrounding quotes.

Author

Commented:
Thanks Martin Liss
I did more testing
Made a one time date for jan 27th with a 8 day notification which i think would make it due today, but it did not show on the list.
8 dayshould it not be on the list?
reminder
Martin LissProtect yourself and your loved ones. Stay home for the holidays.
CERTIFIED EXPERT
Most Valuable Expert 2017
Distinguished Expert 2018

Commented:
I tried it and it worked for me. In your case the report may have been created while you were creating the reminder and put on hold until you finished. To test that theory, stop the app, edit your options.ini file and set the Last Run date to a date in the past and start the app.

If that doesn't work look at the dat file and see if you actually added any notifications for the new reminder.

Author

Commented:
Thought for sure i had added a 8 day notifaction ,but i guess i did not, tried again and it worked
Martin LissProtect yourself and your loved ones. Stay home for the holidays.
CERTIFIED EXPERT
Most Valuable Expert 2017
Distinguished Expert 2018

Commented:
That's good. Don't forget to undo the change you made to the  "Upcoming Reminders" caption.

Gain unlimited access to on-demand training courses with an Experts Exchange subscription.

Get Access
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Empower Your Career
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions