I'm having a complete brain fried moment, and I'm fairly sure this shouldn't prove to difficult for anyone here (though I may be wrong). I am trying to add a bit map to a field in a table. It can be done easily enough using the Insert Object from the menu, but I would like the users to browse to a file (this works fine), select the image (again no problem), and then press a confirm button, and a record is created with the image embedded into the appropriate field.
I was trying to create a new record on the form (again no problem) and then setting a bound OLE Object (bound to the correct field name) using the following code..but it just objects saying
Can't link the OLE object or the bound or unbound object frame
Any ideas greatfully received
' Specify Type.
OLE1.OLETypeAllowed = acOLEEmbedded
' Specify source file.
OLE1.SourceDoc = "C:\Images\ball.bmp"
' Create linked object.
OLE1.Action = acOLECreateLink
' Adjust control size.
OLE1.SizeMode = acOLESizeClip