Solved

How to display image without storing it in table

Posted on 1998-09-04
9
203 Views
Last Modified: 2012-06-27
The Deluxe CD player that comes with Plus98 for Win98 saves CD info as an Access database. I've created a database with links to this, and have also scanned the CD covers.  My form then shows the relevent cover and CD info.

My problem is that no matter what I try, the image is embedded in the table which is now around 100MB in size even though the images total around 3.5MB.  I've searched Microsoft's Knowledgebase and have found:

INF: How to Display Image in Form Without Storing It in Table

Article ID: Q148463

However this solution relies on you manually typing the graphic filename and path into the table.  Is there a way that you can call up an open file style dialog box so that this can populate the table with the file info?  If someone has an answer and says "Yes, just do it in VB" could they provide the step by step guide!

Thanks

JR
0
Comment
Question by:Rudgej
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 3
9 Comments
 

Author Comment

by:Rudgej
ID: 1961273
Edited text of question
0
 
LVL 8

Accepted Solution

by:
Helicopter earned 100 total points
ID: 1961274
On  your form place a common dialog control(called cdlg) and put this code behind a command button. Have ab textbox (txtPicture) bound to your field where you want to store the name.

Private Sub cmdpicture_Click()

On Error GoTo err_cmdpicture_Click

Me.cdlg.ShowOpen
If Not IsNull(Me.cdlg.FileName) Then
Me.txtpicture = cdlg.FileName
End If

exit_cmdpicture_Click:
Exit Sub

err_cmdpicture_Click:
MsgBox Error$
Resume exit_cmdpicture_Click
End Sub
0
 

Author Comment

by:Rudgej
ID: 1961275
Thanks Helicopter,

I've no experience in coding, would you mind explaining in a bit more detail how I put a common dialog control on the form?  NB, I'm using Access 7.0, is this a feature only available from Access 97?

Regards

JR
0
Technology Partners: 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!

 
LVL 8

Expert Comment

by:Helicopter
ID: 1961276
No, it's in 7 too

I don't have 7 handy, but in 8 you have to go to extra controls and look for Microsoft Common Dialog control. It's either on your toolbox or a menu item. Select it and use it like
an ordinary control.

I don't have access to v7 until Monday, but look under activeX or added controls.....you'll find it I'm sure

0
 

Author Comment

by:Rudgej
ID: 1961277
Are how hanging around on-line or what!

I can select a Microsoft Common dialog Control 5.0 (SP2) from Insert | Custom Control, however it then tells me that I don't have the licence required to use this control.  I'll look on my Office 95 CD and see if there are optional controls that can be installed and that I haven't done so.

Thanks

JR
0
 

Author Comment

by:Rudgej
ID: 1961278
Are how hanging around on-line or what!

I can select a Microsoft Common dialog Control 5.0 (SP2) from Insert | Custom Control, however it then tells me that I don't have the licence required to use this control.  I'll look on my Office 95 CD and see if there are optional controls that can be installed and that I haven't done so.

Thanks

JR
0
 
LVL 8

Expert Comment

by:Helicopter
ID: 1961279
I'm here yes....

I got that error using 7 as well. See if you have another version of the control
0
 

Author Comment

by:Rudgej
ID: 1961280
I don't have any other common dialog controls that I can find.  I do however have a copy of VB5 (I thought I might get round to learning it)  - so I'll install that and see if I can get anywhere with the controls from that.

I'll let you know.

Regards

JR
0
 

Author Comment

by:Rudgej
ID: 1961281
I came across a solution on the Knowledgebase "ODE97: "You don't have a license" Error Using Activex Control ID Q172859.  The problem in not being able to use the common dialog was that run-time versions of the controls had been installed, and when the "proper" ones were installed (e.g. by VB5)the OCX files and the corresponding dependency files were not installed.  The solution was to download odelic.exe - however this only works for Office 97 Developer Edition Tools - and not for Office 95.  I got round this by uninstalling the VB5 and renaming comctl32.ocx and comdlg32.ocx, and then reinstalling VB5.

Thanks for your help.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

738 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