Private Sub ViewDelClause_Click()
If IsNull([DelClauseOLE]) Then ' Check the object field is not Null
GoTo OpenObject_End ' [OLEobjectField] is the field name
Else
GoTo OpenObject_Continue
End If
OpenObject_End: ' Field is Null. Exit Sub
MsgBox (" There is no document to open.")
Exit Sub
OpenObject_Continue: ' Field is not Null. Open object .Verb Verb:=xlOpen
' Me![DelClauseOLE].Action = acOLEActivate
With Me![DelClauseOLE]
.Action = acOLEActivate
End With
End Sub
|