简体   繁体   English

连续(报告)视图的“详细信息”部分中的项目不是唯一操作的对象

[英]Items in details section of continuous (report) view not being uniquely operated on

I have a report that needs to show multiple pictures. 我有一个报告,需要显示多张图片。 In the detail section of my report, I have an unbound imageframe object, and a textbox that contains the absolute path of this image. 在报告的详细信息部分中,我有一个未绑定的imageframe对象和一个包含该图像绝对路径的文本框。 I have a function that I use elsewhere in my application that displays an image, given a path and an image frame. 我有一个函数,可以在应用程序的其他地方使用该函数来显示图像(给定路径和图像框架)。 (continuous view, so multiple strings in the detail section). (连续视图,因此详细信息部分中有多个字符串)。

In the on current property, as well as on load, (and I added a button to the detail section to test), I execute the code showpic(me.imageframe, me.imagepath). 在on current属性以及加载时,(我在detail部分添加了一个按钮进行测试),我执行了代码showpic(me.imageframe,me.imagepath)。

My problem is that every imageframe in my report gets rendered to the same (first) path. 我的问题是报告中的每个图像帧都渲染到相同(第一条)路径。 The code isn't executed individually for each element in my report. 该代码并未针对报告中的每个元素单独执行。

How would I achieve this? 我将如何实现?

Using Access 2010, an image frame, and this code: 使用Access 2010,一个图像框架和以下代码:

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
    'Image11 is an image frame and MyImage is a path to a bmp
    Me.Image11.Picture = Me.MyImage
End Sub

I get a new image for each detail item, but only in print preview. 我为每个细节项目得到一个新图像,但仅在打印预览中。 All images were bmp. 所有图像均为bmp。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM