非常简单的表达问题 [英] Very simple expression question

查看:57
本文介绍了非常简单的表达问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




我正在创建一个快速的数据库,需要使用表达式。我不知道我在做什么。


我希望用户能够在一个字段中输入一个数字,让Access对其执行简单的计算(*。 34)并将结果吐回另一个文本框并将其保存在数据库中。


我正在尝试使用AfterUpdate。但我对语法或其他内容一无所知。


提前谢谢。

Hi,

I''m making a quick database and need to use an expression. I have no idea what I''m doing.

I would like the user to be able to input a number in one field, have Access perform a simple calculation on it (*.34) and spit the result back out into another text box and save it in the database.

I''m trying to use the "AfterUpdate" thing but I have no idea on syntax or anything.

Thanks in advance.

推荐答案

Stephen,我是很高兴你问。


这不简单,不推荐。让我从头开始......


计算值非常简单。表达式可以很容易地添加到查询或表单中。强烈建议反对(参见规范化和表格结构 )正在保存可重复计算的值。如果B总是等于A * 0.34,则不应存储B.它应该总是在运行中解决。


计算应该存储的唯一时间是你想要记录历史条件==> B = A * 0.34;变化; B不应该改变以反映A的新值。


查询中所需的表达式只是:
Stephen, I''m glad you asked.

It''s not simple and it''s not recommended. Let me start from the beginning...

Calculating the value is very simple. Expressions can be added into a query or a form easily enough. What is strongly recommended against (See Normalisation and Table structures) is saving the value of a calculation that is repeatable. If B is always equal to A * 0.34, then B should never be stored. It should always be worked out on the fly.

The only time a calculation should be stored is when you want to make a note of the historical condition ==> B = A * 0.34; A changes; B should not change to reflect the new value of A.

The expression needed in the query is simply :
展开 | 选择 | Wrap | 行号


NeoPa,感谢您的帮助和快速回复!我对Access完全不熟悉,按照惯例,我不得不自学而不是被送到课程上:(


所以我为此道歉但是,我在哪里放方程式?计算可以在飞行中完成我想的。它用于计算打印成本。我有这个:


BW_cost:[BW_Clicks] * 0.34


键入BW_cost输入框的After Update属性,但它不起作用。
NeoPa, thanks for the help and the quick reply! I am completely new to Access and as per usual I''m having to teach myself rather than being sent on a course :(

So I apologise for this but, where do I put the equation? The calculation could be done on the fly I suppose. It''s for calculating how much a print costs. So I have this:

BW_cost: [BW_Clicks] * 0.34

Typed into the "After Update" property of the BW_cost input box but it doesn''t work.


[BW_Cost]是你桌子上的现有领域?


这是一个重要的问题。你可以说问题的关键。
Is [BW_Cost] an existing field in your table?

This is an important question. You could say the crux of the matter.


这篇关于非常简单的表达问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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