DavidT_macktool
Well-known member
I have a form that has a date/time picker on it. When a date is picked a variable is set to the value. (dStartdate = StartDate.Text)
The next time I call the SetDate form (from the same calling form) I want to have it start with the date last chosen. (StartDate.Text = dStartdate). If I call the SetDate form from a different calling form I want the default date to be something else.
First time through I want it to start with Today's date. (dim dt As DateTime = DateTime.Now)
1. How do I check if dstartdate is null? - first time date form is called.
2. How do set dstartdate to null when the calling form closes.
I use the SetDate form throughout the project to set report date parameters. Different Forms call the same SetDate form and require different default dates to be set... (eg first day of current month, last day of the month etc.) All this can be done by trying to keep track of another boolean field (saveDate = true) but I want ideas for a better way.
Thanks for listening.
The next time I call the SetDate form (from the same calling form) I want to have it start with the date last chosen. (StartDate.Text = dStartdate). If I call the SetDate form from a different calling form I want the default date to be something else.
First time through I want it to start with Today's date. (dim dt As DateTime = DateTime.Now)
1. How do I check if dstartdate is null? - first time date form is called.
2. How do set dstartdate to null when the calling form closes.
I use the SetDate form throughout the project to set report date parameters. Different Forms call the same SetDate form and require different default dates to be set... (eg first day of current month, last day of the month etc.) All this can be done by trying to keep track of another boolean field (saveDate = true) but I want ideas for a better way.
Thanks for listening.