View Full Version : Need a button on form to open picture or htm file


shenty
09-26-2007, 08:52 AM
Hi all.

I have a database that amongst other things has a list of contracts with addresses, phone numbers etc. I can select any record & double click it to show me more details in a form.

In this form i want to add a button that when clicked will open up a jpg. The jpg will depend on the contract number (ie if the contract number i selected was 1818 then it will open 1818.jpg. This jpg file will be stored in a seperate folder on a network machine.

The jpg's are basically site location maps created from soemthing like multimap.

Thing is they may not always be jpg, they may be html, jpg, gif or bitmap. I could have a different button for each but rather i'd like one but that says something like "click here for a site map". This would then give me a browse box that defaults to the network folder called \\machine\maps & lists ONLY the jpg, bmp, htm or gif that start with the contract number.

Any help would be gr8.

Thanks in advance.

Steve R.
09-26-2007, 09:43 AM
Look at this post (http://www.access-programmers.co.uk/forums/showthread.php?t=105941&highlight=picture).

shenty
09-26-2007, 10:01 AM
Thanks for your reply.

It is similar but does differ to what i need. It appears that your code would add images to a report. I need an open dialog box that points to a specific folder that list files of type jpg, gif, htm or bmp and shows only files beginning with the contract no ID.

Is this possible ?

Zigzag
09-26-2007, 11:02 AM
Try doing a search on Application.FollowHyperlink

Garry

Zigzag
09-26-2007, 11:04 AM
Also check out
http://www.mvps.org/access/api/api0001.htm

Garry