I have records with the following type of Primary Key... YYYY-MM-11111.
(Year record was created, month created, sequential 5 digit # counting from the 1st of each year)
Relatively new database, currently they are up to "2015-02-00841"
I'd like to tie some code to a command button that asks for the last 5 digits, and opens a form with the matching record. The challenge comes in that if there are more than one records that have those last 5 digits, it would need to bring up a list of the matching records... the user could then select a record from that list to open the form.
The above is the basic need....
What would be awesome is that if it did find more than one record that matched the last 5 digits BUT all but one were more than XX days old, it would not present the list, but go ahead and open the form with the most recent record.
Any help would be appreciated.