|
-
Feb 20th, 2000, 11:20 AM
#1
Thread Starter
Hyperactive Member
I have 2 access97 database, A & B, in which B is a newer version having more tables that A do not has and some more fields in tables which A also has. The question is : How I can update the layout of A so that A and B is identical in their layout. I would appreciate a lot if somebody can help me on this.
-
Feb 21st, 2000, 05:46 PM
#2
Hyperactive Member
Hello kmchong,
With next source you can change the structure of your database:
Private Sub Form_Load()
Dim tdfNew As TableDef
Dim ProjectsWS As Workspace
Dim ProjectsDB As Database
Set ProjectsWS = DBEngine.Workspaces(0)
Set ProjectsDB = ProjectsWS.OpenDatabase("c:\YourDB.mdb")
Set tdfNew = ProjectsDB.CreateTableDef("Vendor")
With tdfNew
.Fields.Append .CreateField("Number", dbInteger)
.Fields.Append .CreateField("VendorName", dbText)
End With
ProjectsDB.TableDefs.Append tdfNew
ProjectsDB.Close
End Sub
Success,
michelle
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
|