Hi All
I have a bound OLEAttatchment in my Form.
Im trying to unlock it then add a file then lock it again.
The lock will not execute.
Can someone help?
I have a bound OLEAttatchment in my Form.
Im trying to unlock it then add a file then lock it again.
The lock will not execute.
Can someone help?
Code:
Private Sub btnattach_Click()
On Error Resume Next
Dim sFile As String
With Application.FileDialog(msoFileDialogOpen)
.Show
With .SelectedItems
sFile = .Item(1)
End With
End With
' This is where it doesnt lock
With Me.oleAttatachments
.SetFocus
.Locked = False
.SourceDoc = sFile
.Action = acOLECreateEmbed
.SizeToFit
.Enabled = False
.Locked = True
End With
End Sub
Last edited: