Hey Everyone!

Thanks in advance for your help, but I need some help/advice here for my work-related problem that I'm still googling and trying to find examples, links would be appreciated.

The Problem:
The form has 2 text boxes along with empty text boxes for form data, and the database already has some data, but the user wants to use the same data in the form, for example, clientele data. The Client would enter a 6 digit code, then click on Retrieve, once the retrieve button is clicked, A Database connection is established and the record based on that 6 digit code is retrieve and the data is populated on the form, then the user can just click on send and the form is validated automatically on client then server side, once all validations has been passed, the form is emailed to us.

Can anyone help with this or offer advice please? Thanks in advance!
CasperGemini