Access 2010 - 表单字段不计算直到单击 [英] Access 2010 - Form Fields not Calculating Until Clicked

查看:142
本文介绍了Access 2010 - 表单字段不计算直到单击的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用客户端的Access 2010数据库。它们具有用于数据输入的选项卡形式。在一个表单选项卡上有一些基本的财务计算。以下是一个简化示例:

I am working on a client's Access 2010 database. They have a tabbed form for data entry. On one form tab there are some basic financial calculations. Here is a simplified example:

[注册费]  (在表中绑定货币值)

[Registration Fee]  (bound to currency value in table)

[支付金额] = [支付款] + [现金支付] + [信用卡支付]  (支付金额是未绑定的计算,累加三个约束货币值)

[Amount Paid] = [CheckPayment] + [CashPayment] + [CreditCardPayment]  (Amount Paid is unbound calculation, adding up three bound currency values)

[到期金额] = [注册费] - [支付方式] - [现金支付] - [信用卡支付]

[Amount Due] = [Registration Fee] - [CheckPayment] - [CashPayment] - [CreditCardPayment]

(应付金额是未绑定的计算,基于四个约束货币值)

(Amount Due is unbound calculation, based on four bound currency values)

点击财务选项卡时,对于第一个记录计算字段将为空白。如果我点击其中一个字段,状态栏将简要显示"正在计算..."。然后计算出的金额将会显示出来。这样做之后,如果我滚动到其他记录,
,它们没问题。此表单没有关联的VBA代码。什么可能导致计算第一条记录的延迟?

When clicking over to the Financials tab, for the first record the calculated fields will be blank. If I click into one of the fields, the status bar will briefly show "Calculating..." and then the calculated amount will show up. After doing that, if I scroll to other records, they are fine. There is no VBA code associated with this form. What could be causing this delay in calculating for the first record?

推荐答案

这是一个令人困惑的行为。你能更明确地解释你的最后一段吗?你做了两次测试。在第一个表格中,在同一个表格上(在新标签上,或不是?),你复制了它们所绑定的字段和表达式,结果是相同的吗?但是当
你创建了一个绑定到同一记录源的新表单时,所有计算字段都会立即计算出来?

It is a confusing behavior. Can you explain your last paragraph more explicitly? You made two tests. In the first, on the same form (on a new tab, or not?) you reproduced the fields and expressions they are bound to and the results were identical? But when you created a new form bound to the same record source, all of the calculated fields compute immediately?

Access为我们幕后做了很多事情。我已经看到了许多无法真正追踪的特殊行为。表单是否有很多绑定控件?如果将控件移出选项卡控件,控件的行为是否相同(选项卡控件有时
会产生不必要的副作用)?它们是本机访问表,还是使用odbc链接到sql server(或其他一些数据库)?

Access does a lot of stuff behind the scenes for us. I've seen many peculiar behaviors that can't really be tracked down. Does the form have a lot of bound controls? Do the controls behave the same if you move them off the tab control (the tab control sometimes has unwanted side effects)? Are they native Access tables, or are you using odbc to link to sql server (or some other db)?


这篇关于Access 2010 - 表单字段不计算直到单击的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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