Please help with Bound Object Control

williamlove

Registered User.
Local time
Today, 09:08
Joined
Feb 9, 2006
Messages
37
I have a problem with a Bound Object Control that is bound to a field of type OLE object in a table. The control is used to display an image.

The following objects are relevant to my question:

Table: “Girls”
Field Name: “Picture”
Field Type: OLE Object

Form: “Girls”
Control Name: OLEBound90
Control Type: Bound Object Control

The JPG is always the last file in a selected folder and is put in the windows clipboard by using the following commands in a VBA procedure:

AppNameString = "C:\WINDOWS\EXPLORER.EXE " & FolderName
Call Shell(AppNameString, 1)
SendKeys "{END}", True 'Goes to Last File when all selected
SendKeys "%E", True 'Alt Edit
SendKeys "{DOWN 2}", True 'Down to Copy
SendKeys "{ENTER}", True
SendKeys "%F", True 'Alt File
SendKeys "C", True 'Close

The record for field “Picture” is then populated by executing the following VBA command:

OLEBound90.Action = acOLEPaste

This worked until I had to reinstall Access. After the reinstall, when the procedures were run, the file name was displayed in the control instead of the image. The field “Picture” in the table girls used to be populated with the string “MSPhotoEd.3” but now gets populated with the string “Package”.

Can you help me fix my application?
 

Users who are viewing this thread

Back
Top Bottom