Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help: link shapes to an Access database ???

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hi, need help with the following problem:

I want to link shapes to an Access database.
Everytime I took a shape from the stencil an put it in my sheet, a textbox should appear which shows the data of the current shape. The data should be load from a table thats part of an Access database.

In VisualBasic I handle the access to the database like the following way:

"tbName" stands for the table in the database (Access)
"mdbHandy" stands for the microsoft database (Access)
"tfName" stands for the textfield in which the data should appear


Code in Visual Basic:
-----------------------------------------------------------
'declaration of the variables
Option Explicit
Dim mdbHandy As Database
Dim tbName As Recordset

....

Set mdbHandy = OpenDatabase("Handy.mdb")
Set tbName = mdbHandy.OpenRecordset("Name",dbOpenTable)

'takeover of the data from the table to a textfield
tfName.Text = tbName("Name")
----------------------------------------------------------

But I don't know how to do this in VISIO VBA! There must be similar commands to do this...

Could someone please help me, very urgent!

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top