Image database

G

gavin

I want to set up a database to keep track of my digital photos but I have
come across a couple of problems.

Firstly, I have a field whose data type is set as "OLE Object". In this
field I want to insert small thumbnails of my photos. When I try and insert
a jpeg however all that appears in the field on the data entry form is a
jpeg icon - but when I double click the icon the jpeg file opens. I thought
that the problem here might be because the jpeg graphics filter isn't
installed (because if insert a bitmap I can view that no problem)? I have
tried to install the jpeg graphics filter from the Office Pro CD but I can't
get it to work. Any ideas what I'm doing wrong?

Secondly, I want to also be able to view the full size, hi res photo from
this database. Is the best way to have these images stored in a separate
folder and to hyperlink to that the relevant file in that folder by creating
a new field with the data type "Hyperlink"? I have tried this and it seems
to work Ok but the hyperlink field on the form merely has the file name as
the link - can I change that to something like "Click here to view full size
image"? I have been to the properties of that field and I can't see where I
could do this.

Lastly, I want to assign keywords to each image (maybe up to about 6 for
each image) to help me retrieve them quickly. What would be the best way of
doing this? Just have a text data type field and simply enter all relevant
keywords here? How would I then run a query for these keywords? I might want
to enter 3 keywords as parameters and have all records with those keywords
(out of the potential maximum of 6) returned. Could I run this query from a
form?

This sounds like it might be getting a bit complicated to me but I would
really appreciate any help!


Best wishes,



Gavin
 
L

Larry Linson

I want to set up a database to keep
track of my digital photos but I have
come across a couple of problems.

Before you get too deep into implementing, take a look at the sample imaging
databases at http://accdevel.tripod.com. They 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
 
G

gavin

Larry Linson said:
Before you get too deep into implementing, take a look at the sample imaging
databases at http://accdevel.tripod.com. They 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

Thanks so much, Larry - I'll have a good look at that tomorrow.



Regards,




Gavin
 
G

gavin

Larry Linson said:
Before you get too deep into implementing, take a look at the sample imaging
databases at http://accdevel.tripod.com. They 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


I looked at the sample databases and to be honest much of it was over my
head - this newsgroup is "gettingstasrted" don't forget. I think that was
aimed at pretty serious developers? I for one have no idea what an OLE
server is nor an Active X control, to name just two :)

Is what I am attempting really that difficult? I merely want a database that
allows me to store a thumbnail in each record along with fields such as
ImageName, Photographer, ImageDate, Keywords and a hyperlink to the full
size image in (I assume) a different folder. Am I, as a relative beginner (I
can create tables, design various queries, understand a little simple SQL
etc), biting off more than I can chew? Is it worth me pursuing this?



Regards,



Gavin
 
P

PC Datasheet

Gavin,

It's actually pretty easy to do!

First, it makes it easiest if you store all your images in the same folder
although it is not necessary. You then need a table with all the fields
about your images including a field named Path. Path needs to be Text and in
that field you store the path to each of your images. Path looks like:
C:\NameOfImagesFolder\MyImage.Bmp.
Note: Path must be the full path including the extension.

Create a form based on your images table. The form can also be based on a
query based on your images table. Install an image control (found in the
toolbox) on the form and give it a name. The image control will be unbound.
Install all the controls you need for your image fields and install a hidden
(not visible) textbox. Name the hidden textbox "Path" and make it bound to
Path. Put the following code in the OnCurrent event of your form:
Me!NameOfImageControl.Picture = Me!Path

You now will be able to navigate from record to record and and the image of
each record will appear in the image control.
 
G

gavin

PC Datasheet said:
Gavin,

It's actually pretty easy to do!

First, it makes it easiest if you store all your images in the same folder
although it is not necessary. You then need a table with all the fields
about your images including a field named Path. Path needs to be Text and in
that field you store the path to each of your images. Path looks like:
C:\NameOfImagesFolder\MyImage.Bmp.
Note: Path must be the full path including the extension.

Create a form based on your images table. The form can also be based on a
query based on your images table. Install an image control (found in the
toolbox) on the form and give it a name. The image control will be unbound.
Install all the controls you need for your image fields and install a hidden
(not visible) textbox. Name the hidden textbox "Path" and make it bound to
Path. Put the following code in the OnCurrent event of your form:
Me!NameOfImageControl.Picture = Me!Path

You now will be able to navigate from record to record and and the image of
each record will appear in the image control.

Thanks very much for that - that sounds pretty straightforward at first
glance. I'll give it a go over the weekend and let you know how I go on. Can
I just ask - does the image have to be a bitmap or would this work with
jpegs too?


Regards,



Gavin
 
L

Larry Linson

I just ask - does the image have to be
a bitmap or would this work with
jpegs too?

As the approach Steve described is the one using an Image Control, you will
need the graphics filters installed in order to view JPG files. The graphics
filters are included with Office Pro and with standalone Microsoft Word, but
not with standalone Access. You may have to reinstall / update the install
of Office to get them installed if they were not installed originally. This
is pointed out, BTW, in the article that is included with the files you
downloaded.

And, just some comments: OLE stands for Object Linking and Embedding, a
Microsoft technology that later evolved into the Component Object Model
(COM) which, among other things, allows automating control of one
application (e.g., an image processing program) by another (e.g., an Access
database). If you store files as OLE Objects and display them with Bound OLE
Controls, then it is the image software that you have registered for the
file type that will actually do the displaying (and may allow the image to
be edited, too).

ActiveX is a Microsoft name for controls under Windows that are external to
the program that uses them. They are installed, registered in one or more
places in the Windows registry, and used by various Windows programs.

I'm not sure the above, accurate though it is, will clarify the OLE,
ActiveX, and COM references you asked about.

Larry Linson
Microsoft Access MVP
 
G

gavin

Larry Linson said:
As the approach Steve described is the one using an Image Control, you will
need the graphics filters installed in order to view JPG files. The graphics
filters are included with Office Pro and with standalone Microsoft Word, but
not with standalone Access. You may have to reinstall / update the install
of Office to get them installed if they were not installed originally. This
is pointed out, BTW, in the article that is included with the files you
downloaded.

And, just some comments: OLE stands for Object Linking and Embedding, a
Microsoft technology that later evolved into the Component Object Model
(COM) which, among other things, allows automating control of one
application (e.g., an image processing program) by another (e.g., an Access
database). If you store files as OLE Objects and display them with Bound OLE
Controls, then it is the image software that you have registered for the
file type that will actually do the displaying (and may allow the image to
be edited, too).

ActiveX is a Microsoft name for controls under Windows that are external to
the program that uses them. They are installed, registered in one or more
places in the Windows registry, and used by various Windows programs.

I'm not sure the above, accurate though it is, will clarify the OLE,
ActiveX, and COM references you asked about.

Larry Linson
Microsoft Access MVP


Thanks again for your help, Larry - I'll keep plugging away and hope that
one day it will all "click" :) I am learning - albeit slowly!



Gavin
 
L

Larry Linson

Thanks again for your help, Larry -

You are most welcome. Thanks for your kind words.
I'll keep plugging away and hope
that one day it will all "click" :)

The more you "plug", the more, and sooner, it will "click".
I am learning - albeit slowly!

I started an Access user group back in April 1993. All I promised them then
was that "We will learn Access together." I think no one is more surprised
than I how much I learned over those years! Nobody I've met has ever gotten
"Access enlightenment" in a instantaneous blinding flash of revelation.

Best of luck with your project and your learning. One nice thing is there
are so many newsgroups filled with people who can and will help you over the
rough spots and stumbling blocks.

Larry Linson
Microsoft Access MVP
 
G

gavin

One nice thing is there
are so many newsgroups filled with people who can and will help you over the
rough spots and stumbling blocks.

I second that. I have been helped many times in different forums by kind and
helpful people. Keep it up, guys! Maybe one day I'll be doing some helping
too :)


Gavin
 
G

grep

There's a software package called Picaso (sp?) that seems to do what
you're looking for, instead of Access. It's free, now, from Google.
Might be worth a look-see.

grep
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top