|
-
November 30th, 1999, 10:41 AM
#1
Linking Tables
How can I link ACCESS Database tables in VB5 using DAO.
-
December 2nd, 1999, 05:37 AM
#2
Re: Linking Tables
Use Relation Object , Relations collection and its properties and methods to link tables in runtime
Sample code from VB Help
' Create EmployeesDepartments Relation object, using
' the names of the two tables in the relation.
Set relNew = .CreateRelation("EmployeesDepartments", _
tdfNew.Name, tdfEmployees.Name, _
dbRelationUpdateCascade)
' Create Field object for the Fields collection of the
' new Relation object. Set the Name and ForeignName
' properties based on the fields to be used for the
' relation.
relNew.Fields.Append relNew.CreateField("DeptID")
relNew.Fields!DeptID.ForeignName = "DeptID"
.Relations.Append relNew
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|