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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Query item on network drive 1

Status
Not open for further replies.

drewcp

Programmer
Jul 31, 2008
30
US
On my database i have a button

my goal for this button is for it to pull up a picture off my network "P:\" Drive

In my table i have two fields that i need to use

JOBNO
PREF_PIC_NO

so here is my example data

JOBNO - 1998080993
PREF_PIC_NO - 11

so the picture i am trying to pull up for this one would be stored at

P:\199808\099311.jpg

I don't even have a clue where to start with this because my other problem is that i can't change the table at all because it is a link table

If anyone could even give me some kind of a direction on how to accomplish this, i would greatly appreciate it.
 
This article by MS should give you nearly everything you need to display the image on a form:


Alternatively, this may suit:

Code:
FollowHyperlink "P:\" & Left(JobNo,6) & "\" & Right(JobNo,4) & Pref_Pic_No & ".jpg"
 
thank you so much, the hyperlink works perfectly!

and thank you very much for the link to show how to display the image on the form, haven't figured it out yet, but that is going to be a huge help

thanks agian
 
Alright, so i have been trying and trying and trying to figure out how to put the picture on my form but to no avail, i am afraid that i just do not understand the article enough to do this yet.

Would anybody mind lending me some additional assistance on how to do this?
 
Where are you stuck?

Have you copied and pasted the code into a new standard module called something simple such as modDisplayImage?
 
yes, i have it saved as module1

and that's about as far as i have gotten, i did not understand how to create the form to display the picture based on the information given in the article.

basically, where is image control? i couldn't find it anywhere, i was even adding pictures to try and find an image control but i could not.

I also wondered, i copied and pasted that code just as is. do i need to change it at all to apply to my database?
 
You can just copy and paste the code. You will find an image control on the toolbar with the combobox, listbox etc. It looks like a mountain with a sun:
The best bet could be to add an image, as you tried. I do not have Access available at the moment, but it is something on the lines of Insert->Insert Image and tick Create from File.
 
thank you much

as you showed me earlier with the hyperlink, how is it i can put that coding into the image path?
 
I suggest you add a textbox to your form called:

txtImageName

Set the control source for the textbox to:

="P:\" & Left(JobNo,6) & "\" & Right(JobNo,4) & Pref_Pic_No & ".jpg"

If some jobs do not have images, you will need to do a little more coding.

 
YES! i did that and was able to link into it from my picture properties. thank you so much Remou for your help, that is exactly as i wanted it.

Even better news is that they will all have images so i believe i am totally done with this problem.

thank you so much
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top