Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

How to display image without storing it in table

Posted on 1998-09-04
9
Medium Priority
?
208 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 400 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
NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

 
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

Enroll in October's Free Course of the Month

Do you work with and analyze data? Enroll in October's Course of the Month for 7+ hours of SQL training, allowing you to quickly and efficiently store or retrieve data. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

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

Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
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.
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

618 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