使用文本框和查询进行搜索 [英] searching using text box and query
问题描述
我有一张电影桌和表格。我有一个名为
txtSearch的txt字段,我创建了一个包含所有电影表字段的查询。
我怎么能得到查询加载,所需的电影信息在
it ??
我有一个名为qryFilmQuery的查询
和演员criterea位,我有;
[表格]![frmFilm]![txtSearch]
因此表明,wateva位于frmFilm的txtSearch字段中。好吧。
电影形式我已经有了;
Private Sub Command55_Click()
DoCmd.OpenQueryqryFilmQuery
结束子
但我需要一条线,它给出了搜索值?例如如果我输入
jet li,它会加载查询,并在其中显示每一部电影。
TIA
dev
i have a films table and form. i have a txt field in teh form called
txtSearch , and i;ve created a query with all the film table fields in it.
how can i get the query to load up, wth the required film infromation in
it??
i''ve a query called qryFilmQuery
and on the actors criterea bit, i''ve got;
[Forms]![frmFilm]![txtSearch]
so that indicates, wateva is in the txtSearch field in the frmFilm. right.
on the film form i''ve got;
Private Sub Command55_Click()
DoCmd.OpenQuery "qryFilmQuery"
End Sub
but i need a line in there, which gives the search value? e.g. if i put in
jet li, it shuold load the query, and display every film with jet li in it.
TIA
dev
推荐答案
2006年2月24日星期五17:42:12 GMT,DP < DP@hotmail.com>写道:
如果查询qryFilmQuery将回顾该怎么办?在你的表格中你输入了演员(可能是一个带有ActorID,ActorName的下拉列表):
从电影中选择*
SillyActorID =表格!MyCriteriaForm!MyActorsDropdown
-Tom。
On Fri, 24 Feb 2006 17:42:12 GMT, "DP" <DP@hotmail.com> wrote:
What if that query qryFilmQuery would "look back" at your form where
you entered the actor (presumably a dropdown with ActorID,ActorName):
select * from Films where
SillyActorID=Forms!MyCriteriaForm!MyActorsDropdown
-Tom.
我有一个电影表和表格。我有一个名为
txtSearch的txt字段,我创建了一个包含所有电影表字段的查询。
如何让查询加载,wth它所需要的电影信息呢?
我有一个名为qryFilmQuery的查询
和演员criterea位,我有;
[Forms]![frmFilm]![txtSearch]
这表明,wateva位于frmFilm的txtSearch字段中。正确。
电影形式我已经有了;
私人Sub Command55_Click()
DoCmd.OpenQuery" qryFilmQuery"
但我需要一条线,它给出了搜索值?例如如果我输入了喷气式飞机,它会加载查询,并在其中显示每一部带有喷气式飞机的电影。
TIA
dev
i have a films table and form. i have a txt field in teh form called
txtSearch , and i;ve created a query with all the film table fields in it.
how can i get the query to load up, wth the required film infromation in
it??
i''ve a query called qryFilmQuery
and on the actors criterea bit, i''ve got;
[Forms]![frmFilm]![txtSearch]
so that indicates, wateva is in the txtSearch field in the frmFilm. right.
on the film form i''ve got;
Private Sub Command55_Click()
DoCmd.OpenQuery "qryFilmQuery"
End Sub
but i need a line in there, which gives the search value? e.g. if i put in
jet li, it shuold load the query, and display every film with jet li in it.
TIA
dev
我想先做这个,但意识到在说了100条记录后,
下拉列表会变得太大了。多数民众赞成认为,如果将
分配给文本框会更容易。
wat你认为吗?
dev
" Tom van Stiphout" <无************* @ cox.net>在消息中写道
news:lu ******************************** @ 4ax.com ...
i thought of doing that first, but realised that after say 100 records, the
drop down list would become too big. thats y i think it would be easier if
it was assigned to a text box.
wat do u think?
dev
"Tom van Stiphout" <no*************@cox.net> wrote in message
news:lu********************************@4ax.com...
2006年2月24日星期五17:42:12 GMT,DP < DP@hotmail.com>写道:
如果查询qryFilmQuery将回顾该怎么办?在您输入演员的形式(大概是使用ActorID,ActorName的下拉列表):
从电影中选择*
SillyActorID = Forms!MyCriteriaForm!MyActorsDropdown
-Tom。
On Fri, 24 Feb 2006 17:42:12 GMT, "DP" <DP@hotmail.com> wrote:
What if that query qryFilmQuery would "look back" at your form where
you entered the actor (presumably a dropdown with ActorID,ActorName):
select * from Films where
SillyActorID=Forms!MyCriteriaForm!MyActorsDropdown
-Tom.
我有一个电影表和表格。我有一个名为
txtSearch的txt字段,我在
中创建了一个包含所有电影表字段的查询。
如何让查询加载,wth它所需要的电影信息呢?
我有一个名为qryFilmQuery的查询
和演员criterea位,我有;
[Forms]![frmFilm]![txtSearch]
这表明,wateva位于frmFilm的txtSearch字段中。
正确。
在电影形式上我有;
私人Sub Command55_Click()
DoCmd.OpenQuery" qryFilmQuery"
但我需要一条线,它给出了搜索值?例如如果我把
注入li,它会加载查询,并用
显示每部电影和喷气机。
dev
i have a films table and form. i have a txt field in teh form called
txtSearch , and i;ve created a query with all the film table fields in it.
how can i get the query to load up, wth the required film infromation in
it??
i''ve a query called qryFilmQuery
and on the actors criterea bit, i''ve got;
[Forms]![frmFilm]![txtSearch]
so that indicates, wateva is in the txtSearch field in the frmFilm. right.
on the film form i''ve got;
Private Sub Command55_Click()
DoCmd.OpenQuery "qryFilmQuery"
End Sub
but i need a line in there, which gives the search value? e.g. if i put injet li, it shuold load the query, and display every film with jet li in it.
TIA
dev
我会在更新后使用而不是点击
它不能用你所拥有的东西吗?
当你试图执行时会发生什么
Jerry
2006年2月24日星期五17:42:12 GMT,DP < DP@hotmail.com>写道:
I would use after update and not on click
Is it not working with what you have?
What happens when you try to execute
Jerry
On Fri, 24 Feb 2006 17:42:12 GMT, "DP" <DP@hotmail.com> wrote:
我有一个电影表和表格。我有一个名为
txtSearch的txt字段,我创建了一个包含所有电影表字段的查询。
如何让查询加载,wth它所需要的电影信息呢?
我有一个名为qryFilmQuery的查询
和演员criterea位,我有;
[Forms]![frmFilm]![txtSearch]
这表明,wateva位于frmFilm的txtSearch字段中。正确。
电影形式我已经有了;
私人Sub Command55_Click()
DoCmd.OpenQuery" qryFilmQuery"
但我需要一条线,它给出了搜索值?例如如果我输入了喷气式飞机,它会加载查询,并在其中显示每一部带有喷气式飞机的电影。
TIA
dev
i have a films table and form. i have a txt field in teh form called
txtSearch , and i;ve created a query with all the film table fields in it.
how can i get the query to load up, wth the required film infromation in
it??
i''ve a query called qryFilmQuery
and on the actors criterea bit, i''ve got;
[Forms]![frmFilm]![txtSearch]
so that indicates, wateva is in the txtSearch field in the frmFilm. right.
on the film form i''ve got;
Private Sub Command55_Click()
DoCmd.OpenQuery "qryFilmQuery"
End Sub
but i need a line in there, which gives the search value? e.g. if i put in
jet li, it shuold load the query, and display every film with jet li in it.
TIA
dev
这篇关于使用文本框和查询进行搜索的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!