I need to develop a app for work where I need to enter values into a table.

When the user enters a data into the fields, the table is updated.
What do I have to do if

I type in an number that I have used before.It looks in the table to see if its there, if it is, all the data previously entered is displayed on the form, if the previous number is not there. You can add a new record.

Hope this makes sense...I've tried various ways, but I am stuck...

I would be grateful if you could post some sample code to get me started. Thanks