使用vba从报表OnClick中选择一条记录 [英] Select a record from a report OnClick using vba

查看:137
本文介绍了使用vba从报表OnClick中选择一条记录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想要完成的是用户可以单击报表中的值并编辑表格中的原始数据。现在我已经达到了将字段标签和字段值存储在公共变量中的程度。

当用户点击某个值时,它会启动一个带有txt框的表单来输入替换数据。我试图建立一个修改querry,从txt框中提取数据来替换原始值,但是我没办法通过查询critera指定记录。

解决方案

< blockquote>几个问题,以澄清您的情况。


首先,您的报告包括什么(例如列表框,数据表子表格等),您可以点击一个条目并让它打开你的编辑表格?


其次,当编辑表单打开时,该特定条目的数据是否已正确填充现有数据?


Pat


我可以问一下,为什么当表单被设计用来处理那种类型的活动时,你觉得有必要在报告中尝试这样做吗? / blockquote>

我在这里假设通过''report''OP表示允许用户查看多个记录的表单内的某些内容,例如列表框控件。希望我们能够对这一点做出一些澄清。


What I am trying to accomplish is that the user can click a value in a report and and edit the original data in the table. Right now I am up to the point where I am storing the field lable and field value in public variables.
When the user clicks a value it launches a form with a txt box to enter the replacing data. I tried to build a modify querry that pulls the data from the txt box to replace the original value, but I have no way of specifying the record through the query critera.

解决方案

A couple of questions, to clarify your situation.

First, what does your report consist of (e.g. list box, datasheet subform, etc.) that you are able to click on an entry and have it open your edit form?

Second, when the edit form opens with the data for that particular entry, is the existing data already being populated correctly?

Pat


May I just ask why you would feel the need to try to do this within a Report when Forms are designed to handle that type of activity?


I''ve made an assumption here that by ''report'' the OP means something within a form that allows the user to view multiple records, such as a list box control. Hopefully we can get some clarification on that point.


这篇关于使用vba从报表OnClick中选择一条记录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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