We help IT Professionals succeed at work.
Get Started

How to open a form based on data entered into INPUTBOX, unless there are more than one matching records

247 Views
Last Modified: 2016-02-11
Hello Experts,
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.
Comment
Watch Question
CERTIFIED EXPERT
Top Expert 2016
Commented:
This problem has been solved!
Unlock 1 Answer and 3 Comments.
See Answer
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
Ask ANY Question

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

  • Troubleshooting
  • Research
  • Professional Opinions
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