Determine if searched for customer exists in table

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • MrYoda1
    New Member
    • Feb 2016
    • 15

    Determine if searched for customer exists in table

    I found a terrific thread in this forum called "How to create Search form for database" that shows the VBA code (with an example program) needed to create a search Form using a textbox.

    This is the link to the original thread:
    https://bytes.com/topic/access/answers/696948-how-create-search-form-database

    Jim Doherty posted the solution and example and it was very much appreciated!

    While the code accounted for an empty textbox, one thing missing was a way to make sure that whatever the user entered in the textbox would be checked against the table to be sure there would be a matching record. I could use some help modifying the code to make sure that if there isn't a match a message could pop up stating this and asking the user to try again.

    Thanks for any help you can offer!
  • NeoPa
    Recognized Expert Moderator MVP
    • Oct 2006
    • 32654

    #2
    Add an AfterUpdate event procedure that checks the data entered against the table. At it's simplest this could use the DLookup() function.

    Comment

    Working...