Unanswered: Open the form showing the most recent data???
I have a form , let's call it Flyer, used to enter the programs for a private school. It has controls like "Year", "Season", "ProgramStartDate", "ProgramEndDate", etc. So the data would look like this:
Year - 2003
Season - Fall
ProgramStartDate - 15-Sep-03
ProgramEndDate - 23-Dec-03
I want to put some VB code behind OnOpen event of the form, which will make sure to display the "Flyer" with the most recent data - the one that has just started, or is coming up. I think I could not use FlyerId for this purpose, because if the user decides to enter some data from previous years, then the last entries in the table would hold information on, say a year ago.
To make it short, I need a way to examine the ProgramStartingDate and ProgramEndDate in relation to the current date and then locate the specific FlyerId and open the form with this FlyerId.
Am I right in my approach, or there is a simpler solution? Any help with the code would be very much appreciated.