Code equivalent of dragging an image file into a bound object frame

303factory

Registered User.
Local time
Today, 00:51
Joined
Oct 10, 2008
Messages
136
The clue is in the title :P

I can drag and drop an image file into my bound object frame and it inserts it into my database and displays it onscreen nicely.

I've managed to set up code to capture an image by webcam but I want the image to be inserted into the frame and database automatically.

I've wasted a fair amount of time on google trying to find out how to do this but am getting nowhere!

One site implied it was as simple as
Code:
Me.objectFrame = "C:\Image.bmp"

which creates a new entry in my photos table, but the image field appears to be blank. I suspect I'm just being thick

303
 
and to preempt any responses about it being a bad idea to store images in the database, I need a continuous form setup with N pictures that the user can scroll down and add more to. As far as I can work out this wouldnt be easily done with images stored in a folder. Feel free to correct me on this ^_^
 
After a half day scouring the internet i have found the code I was looking for

Code:
Me.Image.OLETypeAllowed = acOLEEmbedded
Me.Image.SourceDoc = "firstTest.bmp"
Me.Image.Action = acOLECreateEmbed
 

Users who are viewing this thread

Back
Top Bottom