I'v created a MS Access database by the following source code :

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click

'Shows how to create an Access 2000 database and append tables, fields, indexes using ADOX. Don't forget a reference to ADOX (Microsoft ADO Ext. 2.x for DDL and Security)

Dim ADOXcatalog As New ADOX.Catalog
Dim ADOXtable As New ADOX.Table
Dim ADOXindex As New ADOX.Index

On Error GoTo errhandler
ADOXcatalog.Create("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & "c:\newdata.mdb")

On Error Resume Next

ADOXcatalog.ActiveConnection = _
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" _
& "c:\newdata.mdb"

'name table, append fields to table
ADOXtable.Name = "Employees"

ADOXtable.Columns.Append("LastName",)
ADOXtable.Columns.Append("ID" )
ADOXtable.Columns.Append("Department")

'append tables to database
ADOXcatalog.Tables.Append(ADOXtable)


'internal index on two fields
ADOXindex.Name = "TwoColumnsIndex" 'name of index
ADOXindex.Columns.Append("LastName")
ADOXindex.Columns.Append("ID")
ADOXtable.Indexes.Append(ADOXindex)


errhandler:
If Err.Number = -2147217897 Then
MsgBox("Database already exists")
ElseIf Err.Number <> 0 Then
MsgBox("Err " & Err.Description & "; operation not complete")
End If
ADOXtable = Nothing
ADOXindex = Nothing
ADOXcatalog = Nothing
End Sub



And it does works!
I have another problem now: I want to create multiple related tables in the database, but how can I establish relations between them? How can I set primary key and foreign key as well?
anybody can help me?