基于子表记录选择打开图像 [英] Open Image Based on Subform Record Selected

查看:63
本文介绍了基于子表记录选择打开图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个可访问的可搜索表单,在子表单中显示结果。

子表单结果中的一个字段是ImagePath。


我希望能够从结果中选择一条记录,然后单击一个按钮,使用ImagePath打开该特定记录的pdf。

I have a access searchable form that displays results in a subform.

One of the fields in the subform results is ImagePath.

I want to be able to select a record from the results, then click a button that would open a pdf for that specific record using ImagePath.

推荐答案

您可以使用记录上的按钮,代码如下:
You could use a button on the record with code like the following:
展开 | 选择 | Wrap | 行号


这是一个子表单的事实并没有改变任何东西。任何形式都可以使用相同的方法。


您也可以在更改记录时触发代码,或者双击控件及其中的图像路径。这两个都会为按钮节省额外的空间,如果表单处于连续表单模式,这尤其是一个问题。
The fact that this is a subform doesn''t change anything. The same approach could be used on any form.

You could also trigger the code on either the change of record, or double-clicking on the control with the image path in it. Both of these would save the extra space for the button, which is especially a problem if the form is in Continuous Form mode.


Curios你将如何实现这一点:
Curios how would you accomplish this:

您还可以触发记录更改的代码
You could also trigger the code on either the change of record



我想象使用子表格当前事件,但这会触发在很多不需要的情况下,你必须编写代码。


如果图像路径是一个可见的控件,另一个选项(根据NeoPa的建议)可能是更改控件属性以将其格式化为超链接,然后编码开头例如,在DoubleClick上发生。

I imagine using the subforms current event, but that would fire in alot of unwanted cases, which you would have to code for.

If the imagepath is a visible control, another option (as per NeoPa''s suggestion) could be to change the controls properties to format it as a hyperlink, and then code the opening to occur on DoubleClick for example.


这篇关于基于子表记录选择打开图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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