重用以前记录中的数据以填充表单上的相同字段 [英] Reuse data from previous record to populate same fields on form

查看:41
本文介绍了重用以前记录中的数据以填充表单上的相同字段的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个包含客户邮件和帐单邮寄地址的表单。在某些情况下,几个客户的账单地址是相同的(他们的公司正在收取账单)。

我必须为每个包含邮件和帐单邮寄地址的客户创建记录。

我想选择自动填充如果确实是相同的帐单地址,则根据上次保存的客户记录的帐单地址。

我希望我能创建一个setvalue。在点击命令按钮时运行类型宏(或VBA代码,虽然我不是很精通它)。帐单地址由五个不同的字段组成,我将从最后一条记录中获取最新记录。

任何建议??

谢谢

I have a form which contains both customer mail and billing addresses. In some cases the billing address is the same for several customers (ex their company is picking up the bill).
I must create record for each customer that contains their mail and billing address.
I would like to have the option to "autopopulate" the billing address based on the last Customer Record saved, if it is indeed the same billing address.
I am hoping that I can create a "setvalue" type macro (or VBA code, though I am not that well versed in it) to run upon clicking of a Command Button. The billing address is comprised of five different fields, which I would be taking from the last record saved before working on the latest record.
Any suggestions??
Thanks

推荐答案

如果表单上有日期字段(即客户加入或创建时),那么您可以使用 Max <使用SetValue / b>功能。如果你不是,那么你可以输入第一个字段并使用SetValue自动填充剩余的字段(所有字段都将填充第一个字段与您输入的字段匹配的字段)。


有一个名为DLast的函数应该可以工作,因为它的名字表示最后但不幸的是它不是更多的名字,因为它返回一个随机记录。有一个工作要让它工作,但至少据我所知,这是不实际的。


还有另一种填充字段的方法(隐藏视图中的表单)但是我不会说它,因为我不推荐它。


问候,

阿里
If you have date field on the form (i.e when customer joined or created) then you can use SetValue using the Max function. If you don''t, then you can just enter the first field and autopopulate the remaining using SetValue (all fields will be populated with the fields where the first field matches the field you have entered).

There is one function called DLast which should work as its name indicates Last but unfortunately it doesn''t it is more a name because it returns a random record. There is a work around to get it working but seriously it is not practical at least as far as I know.

There is another way to populate the fields (form in hidden view) but I wouldn''t state it as I don''t recommend it.

Regards,
Ali


我确实有一个日期字段的版本。这是最后修订的时间。因此,我可以使用它来查找源表的最后一条记录输入。

如何构建设置值表达式以查找我将从中复制相关信息的源记录?
I do indeed have a version of a date field. It is the "time last revised". As such, I could use that to find the last record input to the source table.
How do I structure the Set Value Exprression to find that source record from which I will copy the info in question?


您将条件定义为最后日期。

将SetValue函数附加到按钮的Onclick事件。它将使用最后一个日期( MAX )填充该字段。

You define the criteria as the last date.
Attach the SetValue function to the Onclick event of the button. It will populate the field with the value with the last date (MAX).

展开 | 选择 | 换行 | 行号


这篇关于重用以前记录中的数据以填充表单上的相同字段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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