insert image to access database...

Posted on 2002-05-23
Last Modified: 2012-06-22
i found a solution in msdn library but cannot work. the solution is as follow:-

Data1  Database Name  C:\TEMP\db1.mdb  
Data1  RecordSource  MyOLETest  
OLE1  DataSource  Data1  
OLE1  DataField  Picture  

Double-click Command1 , and then paste the following code into the Command1 Code window:

OLE1.CreateEmbed "C:\Windows\Circles.bmp"
' Assume the bitmap file is located at C:\Windows\ folder.

p/s: when i want to set the OLE1.datasource it pops up an error "member not found"
Please help...
Question by:green_tea
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
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 7029152
I have tried with success:

Private Sub Form_Load()
  OLE1.CreateEmbed "E:\myfile.bmp"
End Sub

With the table MyOLETest  having the fields
* ID (Autonumber + primary field)
* Picture (OLE)


Accepted Solution

SirNick earned 25 total points
ID: 7029155
Hi green tea

Have a look at the following links


Hope this helps...
LVL 75

Expert Comment

by:Anthony Perkins
ID: 7029790
Please maintain your open questions:

Questions Asked 5
Last 10 Grades Given B  
Question Grading Record 1 Answers Graded / 1 Answers Received

LVL 49

Expert Comment

ID: 7818441
Hi green_tea,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will ask a Community Support Moderator to:

    Split points between: angelIII and SirNick

green_tea, if you think your question was not answered at all or if you need help, just post a new comment here; Community Support will help you.  DO NOT accept this comment as an answer.

EXPERTS: If you disagree with that recommendation, please post an explanatory comment.
DanRollins -- EE database cleanup volunteer

Expert Comment

ID: 7910097
per recommendation

Community Support Moderator @Experts Exchange

angelIII points for you at:

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

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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…

707 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