N
Nick
I am trying to display two images which appear when I select an option. In
this case a button called 2033C.
Essentially I want an image to be displayed in [Image UPS] and a second
image to be displayed in [Image cabinet].
The result of the VBA below is that first image is displayed and an error
occurs for the second image.
Me![Image cabinet].Action = acOLECreateLink does not work.
Private Sub Ctl2033C_Click()
If Me![2033C] = True Then
Me![Image UPS].OLETypeAllowed = acOLELinked
Me![Image UPS].SourceDoc = "C:\2033C.vsd"
Me![Image UPS].Action = acOLECreateLink
Me![Image cabinet].OLETypeAllowed = acOLELinked
Me![Image cabinet].SourceDoc = "C:\cabinet.vsd"
Me![Image cabinet].Action = acOLECreateLink
Else
Me![Image UPS].OLETypeAllowed = acOLELinked
Me![Image UPS].SourceDoc = "C:\Blank.vsd"
Me![Image UPS].Action = acOLECreateLink
Me![Image cabinet].OLETypeAllowed = acOLELinked
Me![Image cabinet].SourceDoc = "C:\Blank.vsd"
Me![Image cabinet].Action = acOLECreateLink
End If
End Sub
this case a button called 2033C.
Essentially I want an image to be displayed in [Image UPS] and a second
image to be displayed in [Image cabinet].
The result of the VBA below is that first image is displayed and an error
occurs for the second image.
Me![Image cabinet].Action = acOLECreateLink does not work.
Private Sub Ctl2033C_Click()
If Me![2033C] = True Then
Me![Image UPS].OLETypeAllowed = acOLELinked
Me![Image UPS].SourceDoc = "C:\2033C.vsd"
Me![Image UPS].Action = acOLECreateLink
Me![Image cabinet].OLETypeAllowed = acOLELinked
Me![Image cabinet].SourceDoc = "C:\cabinet.vsd"
Me![Image cabinet].Action = acOLECreateLink
Else
Me![Image UPS].OLETypeAllowed = acOLELinked
Me![Image UPS].SourceDoc = "C:\Blank.vsd"
Me![Image UPS].Action = acOLECreateLink
Me![Image cabinet].OLETypeAllowed = acOLELinked
Me![Image cabinet].SourceDoc = "C:\Blank.vsd"
Me![Image cabinet].Action = acOLECreateLink
End If
End Sub