I am trying to use the edrawings control in a Microsoft Access form and report to preview a Solidworks file. I have successfully got it to work in a form with the following code:
SLDPRTLink is my filename path and EModelViewControl0 is name of active control.
Option Compare Database
Private Sub Form_AfterUpdate()
On Error Resume Next
Me![EModelViewControl0].fileName = Me![SLDPRTLink]
End Sub
Private Sub Form_Current()
On Error Resume Next
Me.EModelViewControl0.Enabled = False
Me.EModelViewControl0.Enabled = True
Me.Refresh
[EModelViewControl0].fileName = [SLDPRTLink]
End Sub
I am not able to preview the file in a Report. I tried this line of code:
Option Compare Database
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Me.EModelViewControl5.fileName = Me.[SLDPRTLink]
End Sub
Does anyone have any advice or support?
SolidworksApi macros