Solved

DB linking pictures

Posted on 2001-06-15
8
133 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
ID: 6196078
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
ID: 6196086
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
ID: 6196107
if you are using a picture box do:

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

Expert Comment

by:Richie_Simonetti
ID: 6212273
Do you know in advance which picture format is?
are All jpg, gif or bmp or something?
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 49

Expert Comment

by:DanRollins
ID: 7136184
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
ID: 7138277
To me, split between kiprimshot and bobbit.
Cheers
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 7138964
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
ID: 7181605
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

914 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

14 Experts available now in Live!

Get 1:1 Help Now