如何添加图像控件 [英] How to add image control

查看:76
本文介绍了如何添加图像控件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




我已经在表单上创建了一个用于创建新报告的事件。我已经差不多完成但是在报告中无法解决新创建的图像控件的问题。


我有一个带图像路径的源但我找不到解决方案如何将此路径信息添加到控件。


以下是我的代码的一部分。我在第15行收到错误:运行时错误'438':对象不支持此属性或方法。请给出一些建议。

Hi,

I''ve created on a form an event to create a new report. I''ve almost done but can''t solve one problem with newly created image control in the report.

I have a source with image path but i couldn''t find solution how to add this path info to the control.


Below is the part of my code. I receive error on 15th line: "Run-time error''438'': object doesn''t support this property or method". Please give some advises.

展开 | 选择 < span class =codeDivider> | Wrap | 行号

推荐答案

您无法将Image控件绑定到数据源,你可以尝试一个绑定的Object控件
You can''t bind an Image control to a datasource, you could try a bound Object control instead


感谢您的回复ChrisPadgham

我不是非常高级的程序员。我不知道在哪里改变以及如何将我的图像更改为绑定对象:(

我只尝试过这个


rpt.Controls (CatgPhoto)。Picture =" ImagePathlink"

但是收到的消息无法打开文件ImagePathlink。在这种情况下,我理解 ImagePathlink被理解为文件的路径。顺便说一下,我使用Access 2007。
Thanks for your reply ChrisPadgham
I''m not very advanced programmer. I''m not sure where to change and how to change my image to bound object :(
I''ve tried only this

rpt.Controls("CatgPhoto").Picture= "ImagePathlink"

But received message "can''t open the file "ImagePathlink". In this case I understand that "ImagePathlink" is unserstood as the path of file. By the way I use Access 2007.


我假设 ImagePathlink 是一个变量,用于存储完整路径因此引号不是必需的:
I assume that ImagePathlink is a variable where you store the full path for your image. So the quotes are not necessary:
展开 | 选择 | Wrap | 行号


这篇关于如何添加图像控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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