如何将当前记录值分配给表单中的文本框 [英] How to assign Current Record value to textbox in form

查看:83
本文介绍了如何将当前记录值分配给表单中的文本框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用MS Access 2003.我有一个名为frmClient的表单,它有一个名为frmGrantLoan的子表单。 [frmGrantLoan的基础记录集是一个查询,它从tblClient和tblGrantLoan中拉出由ClientID链接。]在frmGrantLoan上,我有一个名为CRNum的未绑定文本框。我有由frmGrantLoan的On Current属性执行的VBA代码(如下所示)。我试图通过在frmGrantLoan上名为CRNum的文本框中显示当前记录编号来显示用户。

I''m using MS Access 2003. I have a form named frmClient which has a subform named frmGrantLoan. [frmGrantLoan''s underlying recordset is a query which pulls from tblClient and tblGrantLoan as linked by a ClientID.] On frmGrantLoan I have an unbound text box named CRNum. I have the VBA code (shown below) executed by the On Current property of frmGrantLoan. I''m trying to show the user the current record number by displaying it in the text box named CRNum on frmGrantLoan.

展开 | 选择 | 换行 | 行号

推荐答案

兔子 - 改变主意后删除:

我在此上下文中指的是表格。表单没有当前记录属性,但表单的记录集确实没有。
Rabbit - Removed after change of mind:
Me in this context refers to the Form. A form has no current record property, the form''s recordset does however.



检查CRNum控件的名称。代码对我来说很好。

Check the name of the CRNum control. The code works fine for me.


你能输出错误信息吗?我不能在工作中打开附件,我通常不会打开那些我不知道作为安全预防措施的人的附件。许多其他专家也不太好。
Can you please type out the error message? I can''t open attachments at work and I don''t normally open attachments from people that I don''t know as a security precaution. Many of the other experts don''t as well.


错误消息读取:

Microsoft.Jet数据库引擎无法找到对象。确保对象存在,并正确拼写其名称和路径名。


frmGrantLoan上未绑定文本框的名称绝对是CRNum
error msg reads:
"The Microsoft.Jet database engine could not find the object". Make sure the object exists and that you spell its name and the pathname correctly."

The name of the unbound textbox on frmGrantLoan is definitely CRNum


这篇关于如何将当前记录值分配给表单中的文本框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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