Solved

How to display image without storing it in table

Posted on 1998-09-04
9
201 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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

The first two articles in this short series — Using a Criteria Form to Filter Records (http://www.experts-exchange.com/A_6069.html) and Building a Custom Filter (http://www.experts-exchange.com/A_6070.html) — discuss in some detail how a form can be…
QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…

790 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