Displaying multiple images in a form.

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top