如何到达子表单中的最后一条记录? [英] How to reach the last record in a subform ?
问题描述
晚上好,
这是我的问题:
我有一个包含子表单的表单。它们是相互关联的。
当我打开表单时,我希望子表单达到最后的
记录。
我尝试了方法docmd.gotorecord aclast但我没有
成功。
感谢您的帮助。
-
_________________________________
网站照片人员:
http://perso.wanadoo.fr/photodim
2003年8月30日星期六19:03:50 +0200,Alain Guichaoua < _ @ wanadoo.fr>
写道:
mysubformcontrol.form.recordsetclone.movelast
- 汤姆。
晚上好,
这是我的问题:
我有一个包含子表单的表单。它们是相互关联的。
当我打开表单时,我希望子表单达到最后的记录。
我尝试了docmd.gotorecord aclast方法但是我没有成功。
感谢您的帮助。
8月30日星期六2003 10:20:34 -0700,Tom van Stiphout
< to ***** @ no.spam.cox.net>写道:
对不起,上一篇文章离我而去。以下是完整的代码:
dim rs as dao.recordset
set rs = mysubformcontrol.form.recordsetclone
rs.movelast >
mysubformcontrol.form.bookmark = rs.bookmark
set rs = nothing
-Tom。
< blockquote class =post_quotes> 2003年8月30日星期六19:03:50 +0200,Alain Guichaoua < _ @ wanadoo.fr>
写道:
mysubformcontrol.form.recordsetclone.movelast
-Tom。
晚上好,
这是我的问题:
我有一个包含子表单的表单。它们是相互关联的。
当我打开表单时,我希望子表单达到最后的记录。
我尝试了docmd.gotorecord aclast方法但是我没有成功。
感谢您的帮助。
On在comp.databases.ms-access中,星期六,2003年8月30日19:03:50 +0200,Alain
Guichaoua < _ @ wanadoo.fr>写道:
晚上好,
这是我的问题:
我有一个包含子表单的表单。它们是相互关联的。
当我打开表单时,我希望子表单达到最后的记录。
我尝试了docmd.gotorecord aclast方法但是我没有成功。
只要坚持将一条记录放在子表单中 - voilla :-)
主要形式:
Private Sub Form_Current()
Dim rs As Recordset
设置rs = MySubForm.Form.RecordsetClone
如果rs.RecordCount那么
rs.MoveLast
MySubForm.Form.Bookmark = rs.Bookmark
结束如果
rs.Close
设置rs =无
结束次级
-
A) bort,R)etry,I)用大锤子冲击。
(用trevor代替sithlord发送电子邮件)
Good evening to all
Here is my problem :
I have a form with a subform. They are linked.
When I open the form I would like the subform to reach its last
record.
I tried the method docmd.gotorecord aclast but i did not
succeed.
Thank you for your help.
--
_________________________________
Site photo personnel :
http://perso.wanadoo.fr/photodim
On Sat, 30 Aug 2003 19:03:50 +0200, "Alain Guichaoua" <_@wanadoo.fr>
wrote:
mysubformcontrol.form.recordsetclone.movelast
-Tom.
Good evening to all
Here is my problem :
I have a form with a subform. They are linked.
When I open the form I would like the subform to reach its last
record.
I tried the method docmd.gotorecord aclast but i did not
succeed.
Thank you for your help.
On Sat, 30 Aug 2003 10:20:34 -0700, Tom van Stiphout
<to*****@no.spam.cox.net> wrote:
Sorry, that previous post ran away from me. Here is the full code:
dim rs as dao.recordset
set rs = mysubformcontrol.form.recordsetclone
rs.movelast
mysubformcontrol.form.bookmark = rs.bookmark
set rs=nothing
-Tom.
On Sat, 30 Aug 2003 19:03:50 +0200, "Alain Guichaoua" <_@wanadoo.fr>
wrote:
mysubformcontrol.form.recordsetclone.movelast
-Tom.Good evening to all
Here is my problem :
I have a form with a subform. They are linked.
When I open the form I would like the subform to reach its last
record.
I tried the method docmd.gotorecord aclast but i did not
succeed.
Thank you for your help.
On Sat, 30 Aug 2003 19:03:50 +0200 in comp.databases.ms-access, "Alain
Guichaoua" <_@wanadoo.fr> wrote:
Good evening to all
Here is my problem :
I have a form with a subform. They are linked.
When I open the form I would like the subform to reach its last
record.
I tried the method docmd.gotorecord aclast but i did not
succeed.
Just stick to putting one record in the subform - voilla :-)
In the main form:
Private Sub Form_Current()
Dim rs As Recordset
Set rs = MySubForm.Form.RecordsetClone
If rs.RecordCount Then
rs.MoveLast
MySubForm.Form.Bookmark = rs.Bookmark
End If
rs.Close
Set rs = Nothing
End Sub
--
A)bort, R)etry, I)nfluence with large hammer.
(replace sithlord with trevor for email)
这篇关于如何到达子表单中的最后一条记录?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!