By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,294 Members | 2,645 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,294 IT Pros & Developers. It's quick & easy.

Embedding Picture problem

P: n/a
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
Share this Question
Share on Google+
2 Replies


P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.