Solved

DB linking pictures

Posted on 2001-06-15
8
132 Views
Last Modified: 2010-05-02
I would like to create a program that reads records from an Access DB. When I type in a record (ie B&D Drill), I would like a picture of that record to pop-up in a picutre box. For example. I have my program running, I type in B&D Drill and then I hit enter and a picture of the record should populate the picture box. The picture files are kept in a separate folder. The name of the picture are the same name of the record (ie record name is B&D Drill and picture file is called B&D Drill.jpg).

Thanks
0
Comment
Question by:VBNewbie
  • 2
  • 2
  • 2
  • +2
8 Comments
 
LVL 2

Expert Comment

by:kiprimshot
Comment Utility
asuming you use an image control
..


'put this kind of code in the necessary event

dim strPath as string
dim strImagePath as string


strPath = yourPath example: "\\SERVER1\"
strImagePath = yourPath & txtImage.text & ".jpg"
Me.image.Picture = strImagePath
0
 
LVL 2

Expert Comment

by:kiprimshot
Comment Utility
If you need to have it pop up you could set the visible property to true when you open it or use another little form and load the form.
0
 
LVL 18

Accepted Solution

by:
bobbit31 earned 100 total points
Comment Utility
if you are using a picture box do:

picture1.picture = loadpicture ("<path to image>")
0
 
LVL 16

Expert Comment

by:Richie_Simonetti
Comment Utility
Do you know in advance which picture format is?
are All jpg, gif or bmp or something?
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 49

Expert Comment

by:DanRollins
Comment Utility
Hi VBNewbie,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will suggest to:

    Accept kiprimshot's comment(s) as an answer.

VBNewbie, if you think your question was not answered at all or if you need help, you can simply post a new comment here.  Community Support moderators will follow up.

EXPERTS: If you disagree with that recommendation, please post an explanatory comment.
==========
DanRollins -- EE database cleanup volunteer
0
 
LVL 16

Expert Comment

by:Richie_Simonetti
Comment Utility
To me, split between kiprimshot and bobbit.
Cheers
0
 
LVL 49

Expert Comment

by:DanRollins
Comment Utility
Thanks for the input Richie_Simonetti,
My first thought was that both were the same answer, but I can see now that they cover two different scenarios. Recommended disposition:

    split points between kiprimshot and bobbit31

DanRollins -- EE database cleanup volunteer
0
 
LVL 5

Expert Comment

by:Netminder
Comment Utility
Per recommendation, force-accepted.

Netminder
CS Moderator

kiprimshot: points for you at http://www.experts-exchange.com/jsp/qShow.jsp?ta=visualbasic&qid=20328650
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now