Full Version: add image and fit to size on a form
UtterAccess Forums > Microsoft® Access > Access Forms
Im just considering wether its a worthwhile venture to help an old mate who has opened up as an estate agent ( some would say an estate agent cannot be a mate).
THe would like me to set up an access database to keep a list of the clients viewing certain houses, this is in itsself is not a major task, the problem I am considering is the ability to set a box as a default size on the form which will reduce down a photo dropped on to it to the size of the box( this would apply for say outside view of house, bedroom 1, bedroom 2 etc, also to link these images to the vendor ( im guessing a simple table with clients name etc and a one to many to view clients viewing)
Is this something I should even be considering or is it something that would make better men shudder
Hi, this does seem like a fairly straightforward requirement.
You need to do as you suggest, creating a table of images, with a foreign key pointing back to the proper client (not the name, of course, use the foreign key).
Images are usually stored externally, but with 2007 you can stored them internally with less of a bloat problem than in earlier versions. Nonetheless I would still store them externally and just set up a link in the image table that points to the network location of the image.
In the form, create an unbound image control. On the current event of the form, load the appropriate image into the image control. Set the "Size Mode" property to "Zoom" to zoom it to fit the image control.
If you need more guidance post back with more detailed questions.
Hi groverpark george
Thanks for your prompt and accurate reply, based on your reply ive started off a sample database which I am pleased with. I can drag and drop an image into a field on the form where its control is a hyperlink from my table. the only (?) thing I cant do at present is to display the image on the form( it only hyperlinks (after a security warning)). I tried setting the hyperlink field to ole but that didnt do what I wanted. I always thought that this problem was going to be the difference between taking on the project ( unpaid by the way) or not doing the project.
Oattach the sample for any welcome comments
This is a "lo-fi" version of UA. To view the full version with more information, formatting and images, please click here.