在最后一条记录后自动关闭表单 [英] Automatically close a form after last record

查看:81
本文介绍了在最后一条记录后自动关闭表单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用宏来打开表单,从其中一个字段复制信息,将该信息粘贴到其他位置,然后转到下一条记录并再次执行相同操作。此过程完美无缺,直到表单的源记录耗尽然后停止。


我希望表单在源表中的所有记录都已处理后自动关闭。处理完所有记录后,似乎没有可用的事件?让我关闭表格。有什么建议吗?谢谢

I use a macro to open a form, copy information from one of the fields, paste that information elsewhere, then go to the next record and do the same again. This procedure works perfectly until the form?s source records are exhausted and then stops.

I want the form to close automatically when all the records in the source table have been processed. When all the records have been processed, there does not seem to be an available ?event? for me to close the form. Any suggestions?Thanks

推荐答案

为什么不使用更新查询?
Why not use an update query?


非常感谢您的建议。不知道我如何能够在此过程中进行更新查询。也许有一种方法可以在没有更多记录时生成错误,然后使用错误事件关闭th4e表单。
Many thanks for your suggestion. Not sure how I could make an update query part of the process. Perhaps there might be a way of generating an error when there are no more records, then use the error event to close th4e form.


我的意思是使用更新查询而不是你的''干嘛如果您只是将一个字段复制到另一个字段,则可以使用不带任何代码的更新查询来完成该操作。
I meant use an update query instead of what you''re doing. If you''re just copying one field into another, you can accomplish that using an update query without any code.


这篇关于在最后一条记录后自动关闭表单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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