MS Access 2007:是否可以(使用 VBA 或类似的东西)获取打开的表或打开的查询结果中的选定行?
这个问题的标题说明了一切,我正在寻找一种方法来实现这一目标。是否可以?
另外,如果这无法实现,是否有其他方法可以将用户选择的 ID 从表/查询传递到表单(即打开表单不是问题,使用超链接字段,传递单击的内容的值是棘手的部分)。
谢谢。
the title to this question says it all, I am looking for a way to achieve this. Is it possible?
Also, if this wouldn't be achievable, are there maybe any other ways in which I can pass the user selected ID from a table / query to a form (i.e. opening the form is not a problem, using the hyperlink field, passing the value of what was clicked is the tricky part).
Thank you.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
通常认为让用户直接访问表或查询结果是不好的做法。您通常应该构建一个表单,其中
然后用户可以从表单中选择他们想要的项目,并且表单可以发送该项目选择其他形式。
It is generally considered poor practice to give users direct access to tables or the results of queries. You should generally build a form that either
The user can then select which item they desire from the form, and the form can send that selection to the other form.
在 Excel 中,您将捕获事件 SheetSelectionChange,因此只是其简短内容:
我认为在 Access 中它会类似。我以前没有用VBA for Access 编程过,但应该是类似的。
以下是一些资源:
http://www.cpearson.com/excel/appevent.aspx
http://www.cpearson.com/excel/Events.aspx
In Excel you would capture the event SheetSelectionChange so just the short of it:
I would think it would be something similar in Access. I haven't programmed in VBA for Access before, but it should be similar.
Here's some resources:
http://www.cpearson.com/excel/appevent.aspx
http://www.cpearson.com/excel/Events.aspx