I need to do something very simple: on a form I have a text box and a button, and I want to get the value the user enters in text box to search in a table (or query) and output only those records that contain such a value. I know it should be pretty simple, but I got confused with the VBA syntax and I couldn’t figure it out.
Can anyone post a block of code in VBA that in SELECT statement in WHERE criteria uses the text box value to compare?
SELECT *
FROM tableName
WHERE fieldName like '% (here the value from the text box) %'
Any help would be much appreciated.
Can anyone post a block of code in VBA that in SELECT statement in WHERE criteria uses the text box value to compare?
SELECT *
FROM tableName
WHERE fieldName like '% (here the value from the text box) %'
Any help would be much appreciated.