子表格 [英] Sub Forms

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

问题描述

您好,我有一个问题,我有一张员工表,其中包含通过员工ID链接的考勤子表单。我没有构建这个数据库,这就是为什么我真的不想改变数据库的结构。我想要做的是添加一个按钮以转到子窗体上的最后一条记录。唯一的问题是创建它的人,将子表单作为数据库表,因此我不能将其添加到子表单上,因为它只显示数据表。我需要在员工表单上添加一个按钮,该按钮将转到子表单上的最后一条记录。任何人都可以帮我吗?

谢谢

解决方案

将此代码放在主表单上。将说明性对象名称(YourButton,YourSubformControl)替换为其实际名称。

展开 | 选择 | Wrap < span class =codeDivider> | 行号



将此代码放在主窗体上。将说明性对象名称(YourButton,YourSubformControl)替换为其实际名称。

展开 | 选择 | Wrap < span class =codeDivider> | 行号



感谢您的回复;但是,我从Access收到错误#0,有原因吗?



您是否使用所讨论的实际名称替换说明性对象名称(YourButton,YourSubformControl)?


YourButton_Click事件的属性表是否显示单词EventProcedure?


您是否编译代码时没有错误?


Hello, I have a question, I have an employee table with an attendance subform linked through the Employee ID. I didn''t not build this database which is why I don''t really want to change the structure of the database. What I want to do is add a button to go to the last record on the subform. Only problem is that the person who created it, made the subform as a database sheet so I can''t add it on the subform because it only shows the datasheet. I need to add a button on the employee form that will go to the last record on the subform. Can anyone help me with this?
Thank you

解决方案

Place this code on the Main Form. Replace the illustrative object names (YourButton, YourSubformControl) with their actual names.

Expand|Select|Wrap|Line Numbers


Place this code on the Main Form. Replace the illustrative object names (YourButton, YourSubformControl) with their actual names.

Expand|Select|Wrap|Line Numbers


Thank you for your response; however, I am getting error#0 from Access, is there a reason?

Did you Replace the illustrative object names (YourButton, YourSubformControl) with their actual names as discussed?

Does the property sheet for YourButton_Click event show the words "EventProcedure"?

Did you compile your code without error?


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

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