Solved

How to display image without storing it in table

Posted on 1998-09-04
9
200 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
  • 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
Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

 
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

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

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

Suggested Solutions

Introduction When developing Access applications, often we need to know whether an object exists.  This article presents a quick and reliable routine to determine if an object exists without that object being opened. If you wanted to inspect/ite…
I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
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…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.

785 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