Newbie question - picture in a form

T

Tony Vella

I have created a form to enter a stamp collection one stamp at a time. I
can't seem to find a way to insert a picture of the stamp on the form. I
have it set up to give me a blank form when I hit an "add new record"
button - I enter country, catagory, date of issue, etc. into the form, then
the "save record" button and all works well. However, I would like to have
another button that says "attach image" and a space on the form where the
image will go once I have found it on my hard drive. I have an Access
help-book which seems rather good; unfortunately I don't know what the
proper terminology is to search for.

I'm not sure I have explained myself properly but I shall hope for the best.
Any help or guidance would be appreciated.
 
G

Geoff

Tony,

In the table that's providing records to the form, you need an OLE Object
field to store the picture.

On the data-entry form, you need a Bound Object Frame. The Bound Object
Frame needs the OLE field as its Control Source.

To insert a picture into a record, open the data-entry form, find the
appropriate record, right-click the Bound Object Frame, and choose Insert
Object on the right-click menu. In the next dialog, click the "Create From
File" button and then the "Browse" button. Select the picture you want to
insert and click OK.

Storing pictures in a database can make the database large. Be on the safe
side and back up regularly.

Geoff
 
T

Tony Vella

Hello Geoff.

Thank you very much for your reply. I followed your steps to the letter and
came to a different problem. My stamps are all scanned individually as jpg
in "country" folders. When I picked one to insert in a form, I get a
message saying : error occurred while accessing the OLE server. The OLE
server may not be registered. To register the OLE server, reinstall it.

I have no idea what that is all about. I have just one computer with one
hard drive and I am the only one who uses this machine. Any ideas?

Thanks in advance and best wishes to all.
--
Tony Vella (Ottawa, Canada)
http://indian-biographies.shorturl.com/

Geoff said:
Tony,

In the table that's providing records to the form, you need an OLE Object
field to store the picture.

On the data-entry form, you need a Bound Object Frame. The Bound Object
Frame needs the OLE field as its Control Source.

To insert a picture into a record, open the data-entry form, find the
appropriate record, right-click the Bound Object Frame, and choose Insert
Object on the right-click menu. In the next dialog, click the "Create From
File" button and then the "Browse" button. Select the picture you want to
insert and click OK.

Storing pictures in a database can make the database large. Be on the safe
side and back up regularly.

Geoff
 
J

Jacob

Tony,

It is not a good idea to embed images in your DB. It will bloat you DB
out of prportion (over and above the size of images). You better off
using the Picture Property to display the stamp images:

1.Create a field (Text Type) in your table and on your form, Let's
call it "strStampLocation"
2. Creat an empty image on your form, Lets call it "imgStamp"
3. Enter the *full* path and file name of each stamp into
strStampLocation i.e. C:\Country\USA\something.jpg

In *both* Current event of the Form and AfterUpdate of strStampLocation
event put the code:

Me.imgStamp.Picture=Me.strStampLocation

Regards
Jacob





Tony said:
Hello Geoff.

Thank you very much for your reply. I followed your steps to the letter and
came to a different problem. My stamps are all scanned individually as jpg
in "country" folders. When I picked one to insert in a form, I get a
message saying : error occurred while accessing the OLE server. The OLE
server may not be registered. To register the OLE server, reinstall it.

I have no idea what that is all about. I have just one computer with one
hard drive and I am the only one who uses this machine. Any ideas?

Thanks in advance and best wishes to all.
 
G

Geoff

Tony:
My stamps are all scanned individually as jpg
in "country" folders.

You can insert jpg files into an OLE object field.
Error occurred while accessing the OLE server.
The OLE server may not be registered.
To register the OLE server, reinstall it.

Suggestion 1: A server is not necessarily a separate computer. You can
have client and server applications running on the same computer. I suggest
you track down your problem by writing down the error message exactly. Go to
the Microsoft website www.microsoft.com and type in the error message into
the Search box and click the search button. You should be able to find the
problem and get advice on putting it right. I'm guessing but is sounds like
you may have a partial installation of Windows or Microsoft Office and the
component you're now trying to use hasn't been installed on your computer.
If that guess is right, then it should be relatively simple to install the
missing component. You'd need to run the setup program for Windows or
Office, selecting Add/Remove features to add the missing component. But get
Microsoft's advice on this first.

Suggestion 2: Jacob's suggestion has much merit. Indeed, if you can
live without the images actually being in the database and are happy for
them simply to appear in an image frame as you move from record-to-record,
then you will save a large amount of disc space. Backing up will be easier.
However, you will have to be disciplined about keeping your hard-disc
folders and database synchronised. I don't know whether you will encounter
the same OLE Server problem - you'll have to experiment. If you go down
this route, there are a number of things you could do to simplify the
retrieval of images from a multitude of country folders and to reduce
ongoing maintenance costs.

Geoff.
 
Top