I am using Access 2003 on Windows XP. I cannot execute this code in any of the form's Open, Load, Activate, Current event.
It gives me the folowing error: The setting you entered isn't valid for this property.
The form does contain a subform, but removing it makes no difference.
Expand|Select|Wrap|Line Numbers
- If IsNull(Me![SketchImage]) Then
- If cmdLoadSketch.Enabled = False Then cmdLoadSketch.Enabled = True
- cmdLoadSketch.Visible = True
- oleSketch.SourceDoc = sPicPath & "\Placeholder.bmp" ' Ignored
- Else
- On Error GoTo Found_Err
- With oleSketch
- .Enabled = True
- .Locked = False
- sPicPath = Me![SketchImage].Value ' This is /<path>/Picture.bmp
- .OLETypeAllowed = acOLELinked
- .Class = "Paint.Picture"
- .SourceDoc = sPicPath ' This line gives error
- .Action = acOLECreateLink
- End With
- End If
Can anyone please help. We need to be able to store the path to object in the database and then change the contents of the of the form and/or report dynamically at runtime.