472,358 Members | 2,076 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,358 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 8644
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
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge required to effectively administer and manage Oracle...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was proposed, which integrated multiple engines and...
1
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. header("Location:".$urlback); Is this the right layout the...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and...
0
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and credentials and received a successful connection...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific technical details, Gmail likely implements measures...
0
Oralloy
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the synthesis of my design into a bitstream, not the C++...
0
by: Carina712 | last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand. Background colors can be used to highlight important...
0
BLUEPANDA
by: BLUEPANDA | last post by:
At BluePanda Dev, we're passionate about building high-quality software and sharing our knowledge with the community. That's why we've created a SaaS starter kit that's not only easy to use but also...

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.