可以增长/可以缩小图像控制Access 2007报告 [英] can grow / can shrink image control Access 2007 report

查看:60
本文介绍了可以增长/可以缩小图像控制Access 2007报告的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想要做的是创建具有可在任何配置中配置的模块化组件的产品的布局图。模块化部件的每个图像具有相同的宽度,具有可变高度,因此当它们在报告中显示时,它们创建成品的2D图像。


用户只需在图纸中选择他们想要的零件(通过是/否数据类型)并按数字排序。


我已经在报告中查看了图像控件的属性,我似乎无法像文本框那样找到一种方法。我希望有人可以指出我正确的方向,或者是否有人知道可以实现此目的的VBA代码。


谢谢。

What I am wanting to do is create layout drawings of a product that has modular components that can be configured in any configuration. Each image of a modular part is the same width with a variable height so when they are displayed in a report they create a 2D image of the finished product.

The user would simply choose the part that they want in the drawing (via a yes/no data type) and sort the order by a number.

I have check the properties in the report for an image control and I can''t seem to be able to find a way to do this like you can with a text box. I was hoping that somebody could point me in the right direction or if anybody would know a VBA code that could accomplish this.

Thank you.

推荐答案

@newguytom


您可以动态控制a的高度,宽度,顶部和左侧属性报告详细信息部分的Format()事件中每个记录的图像控制。以下代码,基于Employees表作为报告的记录源,如果国家/地区字段中的值=''美国',则将保持图像控件的原始尺寸,否则将减少高度和宽度属性50%,同时将Left和Top Properties增加50%。希望这会有所帮助。
@newguytom
You can dynamically control the Height, Width, Top, and Left Properties of an Image Control for each Record in the Format() Event of the Detail Section of a Report. The following code, based on the Employees Table as the Record Source of a Report, will maintain an Image Control''s original dimensions if the Value in the Country Field = ''USA'' otherwise it will reduce the Height and Width Properties by 50% while increasing the Left and Top Properties by 50%. Hope this helps.
展开 | 选择 < span class =codeDivider> | Wrap | 行号


您好ADezii,


感谢您的支持代码,听起来像是我追求的。我已经尝试了但是我收到错误运行时错误438,对象不支持此属性或方法并且调试器停止在 .Height = conORIG_IMAGE_HT"。


我不确定这个,你能说清楚吗?


问候
Hi ADezii,

Thank you for the code, it sounds like it is what i am after. I have tried it however I get an error "Run-time error 438, Object doen''t support this property or method" and the debugger stops on " .Height = conORIG_IMAGE_HT".

I am not sure about this, can you shed some light?

Regards


@newguytom


请使用相应的代码标记发布代码。
@newguytom
Kindly post the code using the appropriate Code Tags.


这篇关于可以增长/可以缩小图像控制Access 2007报告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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