Refreshing a Link Master

D

dave

I have linked a master to a access database. What I want to do is "Select a
record" "refresh" and then "drop it" onto a document. I've figured out the
editing of "selected record" by recording a macro while opening the master
sheet and entering the data into the prop.id. But the "refresh" part is not
recorded in a macro...So how can I trigger the refresh prior to the Drop.
Any suggestions are deeply appreciated.
Dave
 
J

junethesecond

If you have linked with "Data Base Wizard", there also may be available a
"Data Base Refresh" wizard.
 
D

dave

Hi junethesecond,

Yes, I have linked a single master shape using database wizard. What I've
wanted is to select this single master, duplicate it, "Select a database
record" and "refresh" using VBA Then drop it onto a page.

Sub EditMasterBeforeDroppingIt()

Application.Documents.Item("9000
Masters.vss").Masters.ItemFromID(16).Open.OpenDrawWindow
Application.Windows.ItemEx("9000 Masters:Stencil:HR9000.16").Activate
Application.ActiveWindow.Master.Shapes.ItemFromID(5).OpenSheetWindow
Application.ActiveWindow.Shape.CellsSRC(visSectionProp, 1,
visCustPropsValue).FormulaU = myNewlySelectedRecord
'VBA which refreshes the shape because the width and height vary between
database records
Application.ActiveWindow.Close
Application.ActiveWindow.Master.Close

End Sub
 
D

David Parker [Visio MVP]

That is exactly what the Database Wizard setting "Select Record on Drop"
does.
 
D

dave

Hi David,

Can I pass a parameter to the "selection" of the database record? How?

Dave
 
D

David Parker [Visio MVP]

I don't undestand what you mean.
The database wizard requires you to define between 1 and 5
columns/properties that uniquely define the row/shape relationship.
 
D

David Parker [Visio MVP]

Why?
If you are refreshing the shape's properties from Excel, then you could
design the shape (ie program the ShapeSheet) to respond graphically to a
change in property value.
If you want VBA to respond to a change in property, then create an event
sink to listen to formula changed event.
 

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