Search value in MS Access from textbox
I am trying to get record from my table in Access against the va开发者_StackOverflow中文版lue i have entered in my Form
I have a form with a textbox and a button ,on button press it executes a query
query is :
SELECT *FROM Items WHERE (((Items.ItemName)=lmap));
but i want to get only those items which name i entered in my textbox ,for that what should i write instead of lamp,
my textbox name is text1
i tried
SELECT *FROM Items WHERE (((Items.ItemName)=&text1));
but its not working
any suggestions thanks
SELECT * FROM Items WHERE ItemName=[Forms]![MyOpenFormName]![Text1]
Referencing the name in brackets should work.
精彩评论