Truly Stumped

I am a programmer so my natural tendency is towards code. What I am trying to help someone do is SOOOO simple yet I can not figure it out. I have spent hours combing through the forums and just have not found it. I am sure I am just over thinking it. So here it goes:

I need a text box that the user puts in a value, then a button that takes that value and looks it up in the data store and if there is a match, returns the text value that is also stored in the data store.

Simple Right!

I have a text box, I have a button, I have a label. I have a button onClick event below, what am I missing? The data is coming back because I get the record count.

import wixData from ‘wix-data’;

export function button1_onClick(event) {
wixData
.query(‘codes’)
.find()
.then(res => {
console.log(‘Number of returned items: ’ + res.items.length);
$w(’#table1’).rows = res.items;
});
}