开发者

Search value in MS Access from textbox

开发者 https://www.devze.com 2023-03-23 01:46 出处:网络
I am trying to get record from my table in Access against the va开发者_StackOverflow中文版lue i have entered in my Form

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消