visio shapes in an Access report

A

asc4john

Is there a way to add or use Visio shapes in an Access report. I want
to be able to bring in a shape, rotate it, add text to it and set its
position in the report. The only thing I can find in Access is the
Visio 11.0 Drawing Control. But I am unable to find documentation,
actually I don't know what the documentation should look like. Any
pointers would be helpful.
 
A

Al Edlund

you can always paste the drawing into the report as a visio drawing (paste
special) and let ole do it's thing.
al
 
A

asc4john

I can now create Visio files using VBA, I can bring that file into an
Access report.
I can get all of the information in the file, display it using MsgBoxs.
But the report is balnk. Why will the shape not display in the
report? Is there a refeash or update that needs to be done? and where
is it? As far as I can tell the Visio drawing should be visible.
 
A

asc4john

These are just trials and errors. But if I can get MsgBoxs to work the
drawing should show up, right? I have also been trying UnBoundOLE
frames, but still don't know enought. But seems to me these are the
same things.

Private Sub Report_Open(Cancel As Integer)

Dim vis As VisOcx.DrawingControl
Dim visD As Visio.Documents
Dim visP As Visio.Pages
Dim visS As Visio.Shapes

Set vis = DrawingControl9.Object

vis.Src = "MyDrawing.vsd"
' This seems to work to
' vis.Document.Application.Documents.Open "MyDrawing.vsd"

Set visD = vis.Document.Application.Documents
MsgBox "Documents.Count is " & visD.Count
MsgBox "Document Name is " & visD.Item(1).Name

Set visP = visD.Item(1).Pages
MsgBox "Page count is " & visP.Count

MsgBox "MyShape Text " & visP.Item(1).Shapes.Item(1).Text

End Sub
 
A

Al Edlund

I get a similar failure. For testing I put the file name in the src property
of the activex control and it loads the file file during the design process.
When I open the report (like you) the drawing does not display. It appears
to be something in the setup/security of access at runtime.
al
 

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