如何在Access数据库中为每条记录显示多张图片? [英] How to display multiple pictures per record in an Access database?

查看:568
本文介绍了如何在Access数据库中为每条记录显示多张图片?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在访问数据库中存储和显示(在表单或报表上)多张图片

每个
记录。图片不存储在

数据库中。它们存储为文件,数据库包含

图片的路径



数据库由两个表组成:


表数据

ID姓名姓氏


表图片

ID路径


我想创建一个表格,显示每个TABLE DATA记录的数据



所有图片(让我们说水平对齐)对于来自TABLE PICTURES(ID< - > ID)的特定

记录

。 MS Access允许将子表单添加到



表单,但这并不能解决问题,因为子表单只能是
在数据表视图中显示



I want to store and display (on a form or a report) multiple pictures
per
record in an access database. The pictures are not stored within the
database. They are stored as files and the database contains the paths
to the
pictures.
The database consists of two tables:

TABLE DATA
ID Name LastName

TABLE PICTURES
ID Path

I want to create a form displaying data for each record of TABLE DATA
and
all the pictures (let''s say aligned horizontally) for the particular
record
from TABLE PICTURES (ID <-> ID). MS Access allows subforms to be added
to a
form, but this doesn''t solve the case, since subforms can be only
displayed
in data sheet view.

推荐答案

" Wadim Grasza"写了
"Wadim Grasza" wrote
我想在访问数据库中存储和显示(在表格上或报告中)每张记录多张图片
。图片未存储在数据库中。它们作为文件存储,数据库包含图片的路径。
数据库包含。 。 。
我想创建一个表格,显示表数据的每个记录的数据和
所有图片(让我们说水平对齐)
来自TABLE的特定记录
PICTURES(ID< - > ID)。
MS Access允许将子表单添加到表单中,但这并不能解决问题,因为子表单只能在数据表视图中显示。
I want to store and display (on a form
or a report) multiple pictures per record
in an access database. The pictures are
not stored within the database. They are
stored as files and the database contains
the paths to the pictures.
The database consists of . . .
I want to create a form displaying data for
each record of TABLE DATA and
all the pictures (let''s say aligned horizontally)
for the particular record from TABLE
PICTURES (ID <-> ID). MS Access allows subforms to be
added to a form, but this doesn''t solve
the case, since subforms can be only
displayed in data sheet view.




世界上哪些地方让你知道它们只能在

数据表视图中显示?默认情况下,向导会创建,但您肯定可以将子窗体控件的源对象设置为窗体并在子窗体控件中显示该窗体中的数据




除非你对照片的数量有严格的限制,否则试图将它们并排排列可能会产生问题 - 当你拥有它时会发生什么一个

太多不适合在线?


对于报告,使用查询记录源,加入表DATA和表

PICTURES,使用排序和分组属性在

表数据中创建ID上的组,并将每张图片作为详细信息行。详细信息部分。


表单/子表单,子表单控件中的表单的单个记录视图

可能适用于您输入的表单/编辑数据。


这里有一些额外的信息:样本成像数据库
http://accdevel.tripod.com 说明了

Access中处理图像的三种方法,下载中包含一篇讨论

选择一种方法。其中两种方法不使用OLE对象,因此,避免数据库膨胀,以及与OLE对象中的

图像相关的一些其他问题。


如果你在报告中打印图像,为了避免内存泄漏,你还要看看MVP Stephen Lebans''a rel =nofollowhref =http ://www.lebans.com/printfailures.htmtarget =_ blank> http://www.lebans.com/printfailures.htm 。

PrintFailure.zip是一个Access97 MDB包含一个报告,该报告在假脱机到打印机驱动程序之前的

访问格式化过程中失败。

此MDB还包含显示如何转换内容的代码图像

在打印之前控制到位图文件。这有助于缓解Out of

Memory。打印图像密集型报告时可能会弹出错误。


Larry Linson

Microsoft Access MVP



Where in the world did you get the idea that they can ONLY be displayed in
datasheet view? The wizard creates that, by default, but you can certainly
set the Source Object of the Subform Control to a Form and display the data
in that Form within the Subform Control.

Unless you have a strict limit on the number of pictures, trying to align
them side by side could be problematical -- what happens when you have one
too many to fit on the line?

For reports, use a Query for Record Source, joining Table DATA and Table
PICTURES, use the Sorting and Grouping properties to create a Group on ID in
Table Data and each picture as a "detail line" in the Detail Section.

A Form/Subform with single record view of a Form in the Subform control
might work will for the Form where you enter / edit data.

Here''s some additional information: The sample imaging databases at
http://accdevel.tripod.com illustrate three approaches to handling images in
Access, and the download includes an article discussing considerations in
choosing an approach. Two of the approaches do not use OLE Objects and,
thus, avoid the database bloat, and some other problems, associated with
images in OLE Objects.

If you are printing the images in reports, to avoid memory leakage, you
should also see MVP Stephen Lebans'' http://www.lebans.com/printfailures.htm.
PrintFailure.zip is an Access97 MDB containing a report that fails during
the Access formatting process prior to being spooled to the Printer Driver.
This MDB also contains code showing how to convert the contents of the Image
control to a Bitmap file prior to printing. This helps alleviate the "Out of
Memory" error that can popup when printing image intensive reports.

Larry Linson
Microsoft Access MVP

太棒了,用完全相同的

错误信息再次询问完全相同的问题。 子表单只能在

数据表视图中显示是不正确的。我不确定它是在这里还是在另一个新闻组中,我已经回答了你的问题。我建议你访问 http://groups.google.com ,搜索

用于原始帖子,并在那里查看答案。


Larry Linson

Microsoft Access MVP


Wadim Grasza <娲********** @ gmail.com>在消息中写道

news:11 ********************** @ z14g2000cwz.googlegr oups.com ...
Amazing, asking exactly the same question again with exactly the same
misinformation. It is NOT true that "subforms can only be displayed in
datasheet view". I''m not sure if it was here or in another newsgroup where I
answered your question. I suggest you visit http://groups.google.com, search
for the original posting, and review the answer there.

Larry Linson
Microsoft Access MVP

"Wadim Grasza" <Wa**********@gmail.com> wrote in message
news:11**********************@z14g2000cwz.googlegr oups.com...
我想在访问数据库中存储和显示(在表单或报表上)每张
记录。图片不存储在
数据库中。它们存储为文件,数据库包含
图片的路径。
数据库由两个表组成:

表数据
ID名称LastName

表图片
ID路径

我想为表数据的每条记录创建一个显示数据的表单

所有来自TABLE PICTURES(ID< - > ID)的特定
记录的图片(让我们说水平对齐)。 MS Access允许将子表单添加到
表单中,但这并不能解决问题,因为子表单只能在数据表视图中显示。
I want to store and display (on a form or a report) multiple pictures
per
record in an access database. The pictures are not stored within the
database. They are stored as files and the database contains the paths
to the
pictures.
The database consists of two tables:

TABLE DATA
ID Name LastName

TABLE PICTURES
ID Path

I want to create a form displaying data for each record of TABLE DATA
and
all the pictures (let''s say aligned horizontally) for the particular
record
from TABLE PICTURES (ID <-> ID). MS Access allows subforms to be added
to a
form, but this doesn''t solve the case, since subforms can be only
displayed
in data sheet view.



我绝对相信,在您学习

之后,您的惊喜会被视为同时在多个小组中提出此问题。

Nevetheless,没有人似乎有能力解决另一个问题
我在新闻组中发布的
,即:如何显示多个

(数量可能会有所不同)访问表格或报告上每条记录的图像

HORIZONTALLY。


如果有人知道解决方案,请回复。

I am absolutely sure that your amazement will be deemed after you learn
that this question was asked in multiple groups simultaneously.
Nevetheless, no-one seems to competent enough to solve another problem
that I have posted in the newsgroups, which is: how to display multiple
(the number may vary) images per record on an Access form or report
HORIZONTALLY.

If anyone knows the solution, please respond.


这篇关于如何在Access数据库中为每条记录显示多张图片?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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