Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Placing a photo in an Access form.

Status
Not open for further replies.

nschultz

Programmer
Oct 21, 2003
28
US
I have developed a distributable Access mde file. One of the fields is an OLE Object. I need a way for the end user to have the ability to place a photo into this field. Each record would have a different photo.

I have tried using the “cut and paste” and all it displays is an icon in the field rather than the image. Any suggestions?

Norm


 
Nick
I have saved an image as a Bitmap file and then brought it into the form as an unbound OLE object.

Now whether you can have this so the users can insert their own picture - in other words, leave it an "empty" OLE object, I don't know, as I have never done this.

However, it's an interesting concept.

Tom
 
Tom,

The idea was to allow a photo of the individual to be placed in the record of each individual in the file.

I am told it can be done. Just do not seem to get it to work.

I tried the cut and paste. That places a square image of the bit map file with the file name below as if it were an icon on the desk top. ???

Norm
 
Norm
First of all, I apologize for calling you Nick in the last reply. I had been corresponding with a person named Nick and I had a mental slip.

Actually, the only way I had brought in a picture was onto the Main Switchboard form. I just looked at it and see that I didn't use an unbound OLE object; rather I used an Image, and then you can insert any image you want into it.

But, this is not what you want. You want to be able to place a picture of each record in its respective table. I just had a look at the Northwind sample database that comes with Access. The Employees table has one field for an OLE object. And the associated form shows the picture.

Maybe having a look at that would help you.

Tom
 
Tom,

Wnen I attempt to open the Northwind data base a message says it can not be opened without first installing the SQL server software from the installation disk.

This is not something all, if any, of my users will have or be able to do. So any solution requiring SQL will not work.

There must be some other way to do it or at least I hope so.

Norm
 
Norm
All I was meaning was that if you had a look at the way Northwind had accomplished the photo input, it might help you figure out a method for your project.

I don't recall Access 2000 asking for the installation of SQL. Perhaps that's new in 2002.

Tom
 
Hi,
I have created a technique where the user selects a product based on ProductID (actually this is the UPC number) or product description. I then have a function that will search a folder (using Application.FileSearch), create an array of filenames, then dump this array into a listbox. The user can then select a image from the listbox, and this image will then be loaded into the form via an Image Control.

If this is of interest to you, simply send me an email and I will send you a zipped copy of my database (named Coredatabase.MDB). It also contains some interesting code, including a home-made menu system, a login screen, plus some other tidbits. There is no charge for this.

rsmith@cta.org

HTH, [pc2]
Randy Smith, MCP
California Teachers Association
 
Randy,

Thank you. I am sending you an email.

Norm
 
Hi Randy,
I'm trying to perform a similar task. Interested in your code as well. Appreciate if you could e-mail a copy of your Coredatabase.MDB to emutidjo@directdevelopment.com

Thanks and look forward to a reply!

esti
 
Check out the following thread. If you want to display or print a particular photo when each record is displayed in a form or report, then you really should do this dynamically. Don't hardcode into the OLE object. Use a Path string and then a record-to-picture identifier. Use a unique employee identfier like EmployeeID, phone#, etc that can be tacked onto the end of the path to identifier the picture in the folder that should be displayed. Example: Employee titles his photo: Bob(517)555-1212.bmp and places it in the servers G:\pictures folder. Now when the form is displayed the Picture property is modified to the Path. . . + FirstName field + Phone#.bmp which is infomation all found in the record. Now the correct picture is displayed.

Thread702-289543

You see since all of the pictures are in the same pathway then you can use this unique identifier to build the complete path/. . .filename.bmp that can update a Picture object in a form or report. Read up on this technique in the thread and if you have further questions please post back and I will help you.

Bob Scriver
[blue]Want the best answers? See FAQ181-2886[/blue]


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top