如何以相同的形式在数据表中显示查询结果? [英] how to show query results in a datasheet in the same form?

查看:55
本文介绍了如何以相同的形式在数据表中显示查询结果?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个搜索"表单,您可以在其中输入用户要搜索的条件.然后,当我单击搜索"按钮时,查询结果将以单独的形式显示.我想发生的是,在搜索"表单中显示查询结果.有谁知道我应该怎么做(逐步)和代码?谢谢!

I have a Search form where you can input the criteria the user will be searching for. Then when I click the Search button, the query results will show in a separate form. What I want to happen is, show the the query results in the Search form. Does anyone know what I should do (step by step) and the code for it? Thanks!

推荐答案

您可以使用艾伦·布朗(Allen Browne)的搜索条件表单示例作为搜索表单的基础.他以Access 2000格式提供了示例数据库,并且还显示了

You can use Allen Browne's Search criteria form example as the basis for your search form. He provides a sample database in Access 2000 format and also a page which displays the code behind the form.

编辑:您希望查询结果以相同的形式显示在数据表中. AFAIK,无法在数据表视图中的表单上显示您的搜索控件.如果可以接受连续形式,那么布朗先生的例子应该更容易使您适应.但是,如果必须在数据表视图中具有查询结果,则可以将子窗体(其默认视图"属性设置为数据表")添加到搜索表单.但是,该方法将需要您将过滤器应用于子窗体,而不是主窗体.

Edit: You wanted your query results presented as a datasheet in the same form. AFAIK, there is no way to display your search control on a form in datasheet view. If a continuous form is acceptable, Mr. Browne's example should be easier for you to adapt. But if you must have the query results in datasheet view, you can add a subform (with its Default View property set to Datasheet) to the search form. However, that approach will require you to apply the filter to the subform rather than the main form.

这篇关于如何以相同的形式在数据表中显示查询结果?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆