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!

How do I automate import of JPEG image into a form?

Status
Not open for further replies.

Kenny2003

Technical User
Dec 29, 2002
53
GB
Hi Gang,

Forgive me asking for what seems to me to be the impossible.

I simply want to be able to have a button on a form that, when clicked, will import and store a JPEG image that is linked to the current record.

For example, if the current record is for Rose "apple wine" then when i click and import the JPEG, everytime I view the record for this rose, the appropiate JPEG is displayed in the Form.

Allow me to explain a little further.

I have created a database for plant (AS IN FLOWERS) propigation for my own personal use.

I use a form to display and enter data and one of the fields displays an JPEG image of the plant the currenly displayed record relates too. The image is stored outside of the database in a folder called Images.
The field in the underlying table is a bound OLE Object and to add a new image to the database I have to do the following:

Open the table in datasheet view, select the OLE field that corrisponds to the record for which I want to add a
image for.

Right click on the field, select Insert Object, select Microsoft Photo Editor V3.0 Photo
Then select Open An Existing Picture, then select the JPEG file I want to add.

Then select, Exit and return to table and the image is then shown in the form when the record
is viewed.

I am sure there must be a faster or less complicated way of doing this. It may be by code or a macro, but my relitively poor knowledge of coding wont allow me to work out exactly what to do with out help so any hints or tips would be great.
I hope to learn from this and I appreciate any help but be gentle guys as I am no coder and VBA is still very hard for me to do.

Cheers,

Kenny
 
How are ya Kenny2003 . . . . .

Storing graphics in the database [blue]blows it up in a big way[/blue]. Before you get too far, have a look below.

How to Display Images in a Form or in a Report Without Storing the Images in a Table

Calvin.gif
See Ya! . . . . . .
 
Kenny,
I use a similar method to link scanned invoice files to a record. I created a hyperlink field in my table. The user scans the invoice to a specified folderpath and names it the invoice number. The user then enters the invoice vendor, date and number into fields on a form. After update of the invoice number field, I concatinate the filepath, invoice number, and default suffix and set the hyperlink field value equal to the result. I don't display the invoice but you could do the same as the above article said to display it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top