谢谢,I have an Access 2000 database in which I need to update both records in a pairing, based on the difference in the value of a quantity field.This is an example of the pertinent data in the table.PairingIndividualQuantityStatusAB A15AB B13CDC13CDD15EFE14EFF14There will always be 2 individuals per pairing.Each individual will have a value in the quantity field.I need to populate a status field for both individuals, based on the difference between the quantity values of each of the individuals in the pairing. The actual difference is not relevant for this status code, just which individual?s quantity is More than, Less than or Equal to the other individual?s quantity. The codes could be +1, -1 or 0 if I need to us them in other calculations. The results I need would be similar to this:PairingIndividualQuantityStatusABA15M or +1ABB13L or -1CDC13L or -1CDD15M or +1EFE14E or 0EFF14E or 0How can I do this in Access 2000?Thanks, 创建一个由[Pairing],[Individual]和[Quantity]字段组成的查询。创建一个名为Status的计算字段,它将调用fReturnStatus2([Quantity])函数并为每个匹配对返回相应的返回值。所有代码都集中在函数中,仅用于演示目的。这不是获得答案的最有效方法,特别是在为每个记录填充数组时。祝你好运。Create a Query consisting of the [Pairing], [Individual], and [Quantity] Fields. Create a Calculated Field called Status which will call the fReturnStatus2([Quantity]) Function and return the appropriate return value for each matching pair. All the code has been centralized within the Function for demo purposes only. This is not the most efficient way to arrive at the answer especially with the Arrays being populated for each Record. Good Luck. 展开 | 选择 | Wrap | 行号非常感谢。 它''对我(和项目)有很大的帮助!!!Thank you very much.It''s a great help to me (and the project)!!! ADezii,您可以从查询中调用该函数吗?每当我尝试它时,我都会收到错误,未知功能。ADezii, you can call that function from a query? Whenever I try it I get an error, unknown function. 这篇关于根据数据比较填充2条记录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云! 09-06 05:56