开发者

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.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜