Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Northwind Database and you!

Posted on 1999-01-29
5
Medium Priority
?
159 Views
Last Modified: 2013-12-25
I've made a simple Visual Basic 5.0 project, which consists of a form, a database control, and a picturebox control.
Data1 Control Properties
Databasename: Northwnd.mdb
RecordSource: Categories

PictureBox1 Control Properties
DataSource: Data1
DataField: Picture

Now, in theory, I should be able to use the data control to scroll through the pictures in the database, which will appear in the picture box, but what happens, is I get an "invalid picture" error.

Now, when I open the Northwnd.mdb database, I notice that the pictures, are merely ole bitmap image objects, and what appears in the field, is "bitmap image", and not the actual image.  This could be my problem, but does anyone know how to remedy this, so I can view the images through the picturebox, and not get the error?

Thanks.
0
Comment
Question by:frankbrack
  • 3
5 Comments
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 1499630
Try the Data form wizard. It will generate it for you. You will have to resize the control, but it will work!


0
 

Author Comment

by:frankbrack
ID: 1499631
I'm sorry, I guess I would like an explanation as to why my doesn't work, and then how to correct it manually.
0
 

Author Comment

by:frankbrack
ID: 1499632
I'm sorry, I guess I would like an explanation, as to why, my way, doesn't work, and I would like to know how to correct, what I've got so far, manually.

When you view the bitmap image's in the access database, it doesn't physically show the image, in the table, but rather it has a link, that when double clicked, will open the image, in MS Paint.  What's going on here?
0
 
LVL 18

Accepted Solution

by:
mdougan earned 800 total points
ID: 1499633
Instead of using a picture box, instead use an ole object.  When the wizard asks you what kind of ole object, tell it a BMP, and to create a New BMP (as opposed to creating from a file).  Set the normal DataSource and DataField properties and it will work.

What is going on here is, as you suspected, the data has been saved in the Access database as an ole object -- so, it makes sense that you can only view it by using an ole control.  

MD
0
 

Author Comment

by:frankbrack
ID: 1499634
Hi emoreau,
I figured this one out after playing with it.  Using the ole object works perfectly.

But your answer is correct, so I will award you the points.  Thanks.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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…
Suggested Courses

876 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