如何将当前记录值分配给表单中的文本框

编程入门 行业动态 更新时间:2024-10-24 12:21:58
本文介绍了如何将当前记录值分配给表单中的文本框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正在使用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

更多推荐

如何将当前记录值分配给表单中的文本框

本文发布于:2023-11-10 00:43:35,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1573898.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:表单   如何将   文本框

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!