473,553 Members | 2,957 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.b mp"
Me!Photograph.C lass = "Paint.Pict ure"
Me!Photograph.O LETypeAllowed = acOLEEmbedded
Me!Photograph.S ourceDoc = strPathname
Me!Photograph.A ction = acOLECreateEmbe d

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 8903
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.b mp"
Me!Photograph.C lass = "Paint.Pict ure"
Me!Photograph.O LETypeAllowed = acOLEEmbedded
Me!Photograph.S ourceDoc = strPathname
Me!Photograph.A ction = acOLECreateEmbe d

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.Pict ure" 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.b mp"
Me!Photograph.C lass = "Paint.Pict ure"
Me!Photograph.O LETypeAllowed = acOLEEmbedded
Me!Photograph.S ourceDoc = strPathname
Me!Photograph.A ction = acOLECreateEmbe d

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
1729
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, and I've never had any problems with it... I also did an extension to a plugin (Shake) using Python, so the plugin loads a python module and calls...
6
1982
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 a way how I can hyperlink the pictures and have something like thumbnails to view them in a form? any comment apprecciated. thanks
2
4858
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 article (205635) on the subject, but it uses VB (CreateEmbed method) rather than VBA. I can't find any similar method in VBA. A couple of related...
3
5680
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 question is, how to you set the Content-Location of each attachment in the mail headers so that the images are embedded in the html email rather than...
18
2130
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 control or tecnique which I can accomplish this? http://www.tehrantraffic.com/gif.asp?g=cam3_ttcc_00001.jpg&t=TTCC%20website Thanks a lot
6
2987
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 interface is providing a convenient scripting toolkit for the application. One example is that a user can write a python script like: player =...
0
332
by: dr | last post by:
Is there any activex or .net control for embedding the Windows Picture and Fax Viewer into my application?
17
7851
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 the table and opens that record for editing (RST.Edit). However, I'm having difficulty putting the image into the OLE field. If I borrow from the...
1
1830
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
7568
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7772
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7526
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6109
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5133
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3537
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3525
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1990
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
808
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.