使用数据源加速 Microsoft Access 表单加载的其他方法

发布于 2024-12-11 13:12:42 字数 243 浏览 0 评论 0原文

我的任务是修复 Microsoft Access Form 的性能问题。该页面有一个使用查询的数据源。查询连接多个表并进行求和。问题是当页面加载时,表单使用像 QueryColumn = 'ImplossibleValue' 这样的虚拟值来显示空列表。该表单包含搜索条件过滤器和搜索按钮。单击搜索按钮时,将设置正确的过滤器。

由于查询处理大量数据,因此页面首先加载速度非常慢,但当表单打开时,用户会看到空白查询作为设计。有没有办法打开表单并使其没有数据源?

I am tasked to fix a performance issue on a Microsoft Access Form. The page has a datasource using a Query. The Query joins several tables and does summation. The problem is when the page loads, the form uses a dummy value like QueryColumn = 'ImplossibleValue' to show an empty.list. The form contains search condition filter plus search button. When the search button is click the correct Filter is set.

Because the query handles a lot of data, the page loads very slow at first but when the form opens the user is presented with blank query as design. Is there a way to Open the form and to make it have no data source?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

一花一树开 2024-12-18 13:12:42

您可以将记录源更改为返回 Null 值的查询,并且不需要引用任何表。

SELECT Null AS field1, Null AS field2;

用户选择搜索条件后,将记录源更改为包含这些条件的查询。更改记录源会自动触发重新查询。

如果用户在记录源更改为搜索查询后保存表单设计,则表单在下次打开时将再次使用该设计。您可以通过在表单打开事件期间重置该属性来强制表单始终使用虚拟行查询作为其记录源打开。

Me.RecordSource = "SELECT Null AS field1, Null AS field2;"

You can change the recordsource to a query which returns Null values and need not reference any of your tables.

SELECT Null AS field1, Null AS field2;

After the user selects her search criteria, change the recordsource to the query which incorporates those criteria. Changing the recordsource automatically triggers a requery.

If a user saves the form design after the recordsource has been changed to the search query, the form will use that again the next time it is opened. You can force the form to always open with the dummy row query as its recordsource by resetting that property during the form open event.

Me.RecordSource = "SELECT Null AS field1, Null AS field2;"
彼岸花ソ最美的依靠 2024-12-18 13:12:42

打开表单时,请在 docmd.openform 语句中使用 where 条件。其中primarykey = null,则不会有任何记录,并且不需要解绑整个表单。

When you open the form, use a where condition in the docmd.openform statement. where primarykey = null there will be no records and you don't need to unbind the entire form.

贵在坚持 2024-12-18 13:12:42

10 年前,我在使用 Jet 时也遇到了类似的性能问题,我找到的唯一解决方案是转向 Access Data Projects。

使用 SQL Server 升级到客户端-服务器应用程序,运行几个查询向导来确定正确的索引,您将立即获得出色的性能。

I had similar performance problems with Jet 10 years ago, and the only resolution I found was to move to Access Data Projects.

Upsize to client-server application using SQL Server, run a couple of query wizards to determine proper indexing, and you'll have excellent performance in no time.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文