General discussion

Locked

Access, Insert jpg in Memo field

By hyperpc ·
I was told in a training session that a stand alone graphic such as a jpg could be inserted into a memo (data type) field, and that it took a string command code to do it. I have checked all my books (and the books she recommended) and have not been able to find out how to do that.

Anyone?

This conversation is currently closed to new comments.

6 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Access, Insert jpg in Memo field

by hyperpc In reply to Access, Insert jpg in Mem ...

Point value changed by question poster.

Collapse -

Access, Insert jpg in Memo field

by roc180 In reply to Access, Insert jpg in Mem ...

I have done something similiar but I used the OLE Object data type. I have heard of storing the binary code of a bitmap in a memo field but not for a jpg. If you want I can send you an example of pasting a file into a table and then retrieving it. Let me know.

Good Luck

Neal Martinelli

Collapse -

Access, Insert jpg in Memo field

by hyperpc In reply to Access, Insert jpg in Mem ...

The question was auto-closed by TechRepublic

Collapse -

Access, Insert jpg in Memo field

by mbarker734 In reply to Access, Insert jpg in Mem ...

The only infomation a memo field will display is text. If you want to diplay a different .jpg image on each form you can do the following:

The table field is OLE object. The box on your form for containing the .jpg picture is a Unbound Object Frame.

Use the Insert Object dialog box.

Select Create New, then select an
appropriate photo editor (I use Microsoft Photo Editor 3.0). This editor should be
capable of working with .jpg files. Opening the existing file in the editor and then
closing the editor should place the appropriate .jpg file on your form.

In the Format properties for you picture field on your form Size = Stretch. This will
cause the .jpg file to be scaled to fit the area of the Unbound Object Frame.
Is this process clumsy? ?? YES. Can you shorten the process? ? only slightly.
The clumsiness comes from allowing the versatility of the type of file you can insert
into the Unbound Object Frame.

First: Right clicking in the Unbound Object Frame of your form will produce a drop
down box with Insert Object as an option. Steps removed none just more
convenient than the menu bar.

Second: You can install the following code on an event of the Unbound Object
Frame (I like DoubleClick).

DoCmd.RunCommand acCmdInsertObject

Steps removed 1.

Or if you do not like using and event in the Unbound Object Frame you can create a
Command Button with the following code.

Me!MyPicture.Setfocus
DoCmd.RunCommand acCmdInsertObject

Steps removed still only 1. Again, if you discount the one time coding step.

Personally I would opt for the command button, thus leaving the Unbound Object
Frame events for other things such as Double Click opening a true viewing
program for the .jpg file. Doing this will provide you with the ability to zoom and
scroll around on the .jpg file if you desired.

Good luck,

Mark

Collapse -

Access, Insert jpg in Memo field

by hyperpc In reply to Access, Insert jpg in Mem ...

The question was auto-closed by TechRepublic

Collapse -

Access, Insert jpg in Memo field

by hyperpc In reply to Access, Insert jpg in Mem ...

This question was auto closed due to inactivity

Back to Software Forum
6 total posts (Page 1 of 1)  

Related Discussions

Related Forums