It's nothing to programmatically insert the Bitmap file into the OLE field.
Here's a sample for a Word Doc. You'll have to change it support MS Paint
BMP's instead which would be class "Paint.Picture". As teh sampel indicates,
you will need a Bound OLE Frame control on your form. You can make it hidden
if you don't want the user to see it at this point in your UI.
Private Sub cmdOLEAuto_Click()
On Error GoTo Error_cmdOLEAuto_Click
With Me![OLEWordDoc]
.Enabled = True
.Locked = False
' Specify what kind of object can appear in the field.
.OLETypeAllowed = acOLEEmbedded
' Class statement for Word document.
.Class = "Word.Document"
' Specify the file to be embedded.
' Type the correct path name.
.SourceDoc = "c:\<pathname>\TestOLEAuto.doc"
' Create the embedded object.
.Action = acOLECreateEmbed
' Optional size adjustment.
.SizeMode = acOLESizeZoom
End With
Exit_cmdOLEAuto_Click:
Exit Sub
Error_cmdOLEAuto_Click:
MsgBox CStr(Err) & " " & Err.Description
Resume Exit_cmdOLEAuto_Click
End Sub

Signature
HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
>I have a folder full of flags each drawn as a bitmap. When I enter a new
> country into the Access database, I want to write a piece of software in
[quoted text clipped - 55 lines]
>> >> >> > hang
>> >> >> > VBA?
Stephen, that is fine: I can now use VBA to display the flag in an unbound
frame on a form, and I can even copy the flag to the Clipboard if I add
".Action acOLECopy" to your code, but how can I use VBA to embed that flag
into an OLEobject field of a table? Though I can drag and drop the image
manually, there are over 250 flags in my table and I want to be able to
update the table automatically. If I am to display the flags beside the
relevant country names on a continuous form I believe there is no alternative
but to embed them in the table (please see my original question).
> It's nothing to programmatically insert the Bitmap file into the OLE field.
> Here's a sample for a Word Doc. You'll have to change it support MS Paint
[quoted text clipped - 85 lines]
> >> >> >> > hang
> >> >> >> > VBA?
McFestoe - 20 Feb 2006 23:03 GMT
Mike
I have just found your thread and are at the moment trying to do what i
think you have acheived, did you get it working with the above code or did
you have to change it, VBA code is a new thing to me and i seam to be
leaning all the time.
What iam trying to do is store electonic service sheets with the customers
signature on, so i can get rid of some paperwork and store thing
electronically, could you let me know how far you have got and how you have
done it.
Thanks
Rich
> Stephen, that is fine: I can now use VBA to display the flag in an unbound
> frame on a form, and I can even copy the flag to the Clipboard if I add
[quoted text clipped - 112 lines]
>> >> >> >> > hang
>> >> >> >> > VBA?
MikeT - 21 Feb 2006 10:40 GMT
Please see my answer to Stephen Lebans below. I can now search a folder of
bitmaps outside Access, copy the images into an Access table and display them
alongside the relevant table entries in a continuous form. The code provided
by Stephen worked perfectly - I just applied it wrongly at first. Mike
> Mike
>
[quoted text clipped - 128 lines]
> >> >> >> >> > hang
> >> >> >> >> > VBA?
Stephen Lebans - 20 Feb 2006 23:29 GMT
Did you try the code I posted with an OLE Frame control BOUND to an OLE
field?

Signature
HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
> Stephen, that is fine: I can now use VBA to display the flag in an unbound
> frame on a form, and I can even copy the flag to the Clipboard if I add
[quoted text clipped - 112 lines]
>> >> >> >> > hang
>> >> >> >> > VBA?
MikeT - 21 Feb 2006 10:38 GMT
My mistake! I used your code with an UNBOUND Frame - it worked perfectly but
did nothing to the original table. I shall now try the same code with a
bound frame, which I understand will then amend the table to which it is
bound! Thank you for your help - I think I have just about solved my
problem. Mike
> Did you try the code I posted with an OLE Frame control BOUND to an OLE
> field?
[quoted text clipped - 115 lines]
> >> >> >> >> > hang
> >> >> >> >> > VBA?