"Wadim Grasza" wrote
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.
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