473,385 Members | 1,409 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Embedding Picture problem

Lyn
I am trying to embed a picture into a Bound Object Frame (Me!Photograph)
with the following code which is based on MS article
http://support.microsoft.com/?id=158941:

strPathname = "C:\photo.bmp"
Me!Photograph.Class = "Paint.Picture"
Me!Photograph.OLETypeAllowed = acOLEEmbedded
Me!Photograph.SourceDoc = strPathname
Me!Photograph.Action = acOLECreateEmbed

I get the following helpful error message (Error 2793) when the .Action
statement is executed:

"Microsoft Office Access can't perform the operation specified in the Action
property of the Visual Basic procedure you're trying to run."

I am using Access 2003 under WinXP.

I am not sure if I have the right value for .Class for a .bmp object, or if
I should be using .OLEClass instead (or as well). I don't need to edit the
picture from this form or table -- just to store it and display it.

Can anyone see what I am doing wrong? Or point me to a better tutorial for
this?

TIA for any help.

--
Cheers,
Lyn.
Nov 13 '05 #1
2 8864
Lyn
OK, I have resolved the initial problem. Unfortunately the information I
gave would not have helped. The problem was that the Bound Object Frame was
not visible at the time of attempting to embed. Making the control visible
allowed the embedding to proceed. Stupid me!

However this has just raised a new problem, so I still need some help...

The size of the Frame on the form is set to Width 5 cm (2") and Height 6 cm
(~2.2"). The embedded picture appears as a chunky square thumbnail with the
filename in large font underneath. The size of the thumbnail and font seems
to adjust automatically to fit the filename in the width of the Frame. That
is, a short filename = large thumbnail and font; long filename = tiny
thumbnail and smaller font. Naturally, I just want the picture content
(without the filename) to fill the Frame completely.

Some control property settings:
Size Mode: Zoom
Display Type: Content
Update Options: Manual
OLETypeAllowed: Embedded
Class: Paint.Picture
AutoActivate: Manual
Verb: 0

This problem is also occurring using the Insert->Object... menu item and
selecting Create from File. However, when I first started working on this
project I was able to use Insert->Object to insert just the full size
picture. I still have a number of early records with the full size picture.
That was a few months ago. Obviously something has happened since then to
change things. There must be an option or property that has changed, but I
can't find it.

Please, can anyone shed some light???

One other thing... When embedding, I get the hourglass icon for a good 20
seconds before the picture appears. I don't remember such a long delay when
I was first working in this area. Is this delay normal (my test database is
very small)???

--
TIA,
Lyn.

"Lyn" <lh******@ihug.com.au> wrote in message
news:d4**********@lust.ihug.co.nz...
I am trying to embed a picture into a Bound Object Frame (Me!Photograph)
with the following code which is based on MS article
http://support.microsoft.com/?id=158941:

strPathname = "C:\photo.bmp"
Me!Photograph.Class = "Paint.Picture"
Me!Photograph.OLETypeAllowed = acOLEEmbedded
Me!Photograph.SourceDoc = strPathname
Me!Photograph.Action = acOLECreateEmbed

I get the following helpful error message (Error 2793) when the .Action
statement is executed:

"Microsoft Office Access can't perform the operation specified in the
Action property of the Visual Basic procedure you're trying to run."

I am using Access 2003 under WinXP.

I am not sure if I have the right value for .Class for a .bmp object, or
if I should be using .OLEClass instead (or as well). I don't need to edit
the picture from this form or table -- just to store it and display it.

Can anyone see what I am doing wrong? Or point me to a better tutorial
for this?

TIA for any help.

--
Cheers,
Lyn.

Nov 13 '05 #2
Lyn
OK, I have now resolved the latest problem. I had "Paint.Picture" as the
value for Class property, but the Windows File Association set up for BMP
files was Microsoft Office Picture Manager. Originally it had been Paint.
I changed the association back to Paint and it now works correctly, as it
did a few months ago. There is probably a Class value for Picture Manager,
but at present I don't know what it is.

--
Cheers,
Lyn.

"Lyn" <lh******@ihug.com.au> wrote in message
news:d4**********@lust.ihug.co.nz...
OK, I have resolved the initial problem. Unfortunately the information I
gave would not have helped. The problem was that the Bound Object Frame
was not visible at the time of attempting to embed. Making the control
visible allowed the embedding to proceed. Stupid me!

However this has just raised a new problem, so I still need some help...

The size of the Frame on the form is set to Width 5 cm (2") and Height 6
cm (~2.2"). The embedded picture appears as a chunky square thumbnail
with the filename in large font underneath. The size of the thumbnail and
font seems to adjust automatically to fit the filename in the width of the
Frame. That is, a short filename = large thumbnail and font; long
filename = tiny thumbnail and smaller font. Naturally, I just want the
picture content (without the filename) to fill the Frame completely.

Some control property settings:
Size Mode: Zoom
Display Type: Content
Update Options: Manual
OLETypeAllowed: Embedded
Class: Paint.Picture
AutoActivate: Manual
Verb: 0

This problem is also occurring using the Insert->Object... menu item and
selecting Create from File. However, when I first started working on this
project I was able to use Insert->Object to insert just the full size
picture. I still have a number of early records with the full size
picture. That was a few months ago. Obviously something has happened
since then to change things. There must be an option or property that has
changed, but I can't find it.

Please, can anyone shed some light???

One other thing... When embedding, I get the hourglass icon for a good 20
seconds before the picture appears. I don't remember such a long delay
when I was first working in this area. Is this delay normal (my test
database is very small)???

--
TIA,
Lyn.

"Lyn" <lh******@ihug.com.au> wrote in message
news:d4**********@lust.ihug.co.nz...
I am trying to embed a picture into a Bound Object Frame (Me!Photograph)
with the following code which is based on MS article
http://support.microsoft.com/?id=158941:

strPathname = "C:\photo.bmp"
Me!Photograph.Class = "Paint.Picture"
Me!Photograph.OLETypeAllowed = acOLEEmbedded
Me!Photograph.SourceDoc = strPathname
Me!Photograph.Action = acOLECreateEmbed

I get the following helpful error message (Error 2793) when the .Action
statement is executed:

"Microsoft Office Access can't perform the operation specified in the
Action property of the Visual Basic procedure you're trying to run."

I am using Access 2003 under WinXP.

I am not sure if I have the right value for .Class for a .bmp object, or
if I should be using .OLEClass instead (or as well). I don't need to
edit the picture from this form or table -- just to store it and display
it.

Can anyone see what I am doing wrong? Or point me to a better tutorial
for this?

TIA for any help.

--
Cheers,
Lyn.


Nov 13 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Hugh Macdonald | last post by:
I've got a slight problem... and I'm stuck as to where to go with it... I'm running on Redhat7.2, using Python 2.2.2 I've got a compiled module that I wrote almost a year ago - it works fine,...
6
by: theo.bruening | last post by:
Hello all. I hope someone can help me here. I need to make a db on many pictures, however, if I OLE them, the access database grows hugely. If I only hyperlink them, I can't view them. is there...
2
by: Lyn | last post by:
What is the best way to import a picture (bmp format) via VBA from a Windows file and embed it into a Bound Object Frame (and thence to an OLE Object in a table)? I found an MS knowledge base...
3
by: Tim T | last post by:
Hi, I hope there is someone reading this that has the answer, Please Help! I have the need to send a html email via asp.net. its easy enough to send an html email and add attachments. My...
18
by: J-T | last post by:
Hi All, There is a picture on the following URL which I want to have it in one of my asp.net pages .I mean I want to embed the content of this page in my own page and get its image.Is there a...
6
by: Qun Cao | last post by:
Hi Everyone, I am a beginner on cross language development. My problem at hand is to build a python interface for a C++ application built on top of a 3D game engine. The purpose of this python...
0
by: dr | last post by:
Is there any activex or .net control for embedding the Windows Picture and Fax Viewer into my application?
17
by: anthony | last post by:
I want to embed some BMP files into an OLE field (called BMP) in an existing table using code. I've created the code that grabs the filename from the image folder, finds the corresponding record in...
1
by: ambercolorenergy | last post by:
I was wondering what the code is for embedding a webcam in a web site and displaying the picture? Does anyone know? Thanks Greg
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.