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
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