Data and Diagrams / Linking to a Database
Visitors to VTC.com will be able to view all introductory videos for each training course.
Free Trial Members will gain access to first three chapters for each training course.
Full Access Members have full access to VTC.com’s entire library of video tutorials.
Learn More
Subtitles of the Movie
Well, now we are going to create a link between the diagram here and the spreadsheet data, so that if we change the diagram, the data will change to reflect that, or if we change the data here in the spreadsheet, then the diagram will change. To do that, we go up to Tools and we select the Macros option. We then go down to Visio Extras, and from there, you cant see it on the screen, but you have to got to pick the Link to Database function. Then the link to database dialog box appears, and it is very similar to the export to database that we saw before. We go up and select the particular database we are using, in this case an Excel file. We must browse for the particular file concerned, and it's brought that up there now in the Qualifier box. We know we want the test table, so that is correct, and we want the same fields as we had before: shape, height, well the shape ID, the height and the displayed text. You'll see the full names there, you will see that: shape key, height, and shape text, and that's all set up to go. The only thing we need to do before it's truly excellent is to select the shapes that must be part of linkage. So let me just cancel out of that, and select the shapes here. Using the shift key, and clicking on each one, I will select three of the shapes. And I go back in now - Tools>Macros>Visio Extras>Link to Database, and I will select my file once again and then click ok. So that's done. We have one further step to do though. On each of the shapes that the linkage has to occur, we have to go and select the shape and right click on it. Then you will see we have got this menu of database-related functions available for that particular shape. And in our case to start with, we want to select the database record that applies to that shape. Here we have the select database record, and it's the giving us the key values - 1, 6 and 8. Now we have a look on our table here, you will see that 6 is the end shape, 1 is process 1, and 8 is start. So in this case, we want to link to 8. In a similar way we can do the other ones - the process 1 there is 1, and the end is 6. That's all set up. To see if it works, let's make a change to something. If we go to the START shape there, select the Text tool, and I will change that to STARTING. Go back to our pointer tool, and now if I right click and click update database record, you will see that indeed that label there has changed to 'starting'. Equally well we can go the other way. If I double click on this, this opens the database in Excel. We can come into the starting field there, and let's just delete those letters out like so - it appears there on our embedded version. And we can go back to the shape now on the drawing, and select Refresh Shape Properties this time. And you will see that that value there has now been copied back into our drawing. We can also change the height and see how that's reflected. If I go to process 1, change the height, you will see at the moment process 1 has a height of 15 millimeters before I stretched it. And now if I go Update Database Record, that's changed to a height of 25. To go back again let's click here, change that back to 15, and click on here, Refresh Shape Properties, and it's back to where it started.
Tutorial Information
| Course: | Microsoft Visio 2002 |
| Author: | Pravah Pugh |
| SKU: | 33305 |
| ISBN: | 1889347094 |
| Release Date: | 2002-02-25 |
| Duration: | 8.5 hrs / 65 lessons |
| Captions: | For Online University members only |
| Compatibility: |
Vista/XP/2000, OS X, Linux QuickTime 7, Flash 8 |
VTC Sign up & Benefits
- Unlimited Access
- 98,729 Video Tutorials (23,265 free)
- Video Available as Flash or QuickTime
- Over 1026 Courses
- $30 for One Month Access
- Multi-User Discounts Available
United States 