Here is the code I have in a Module...Is that correct?
Sub Create_Relationship()
Dim dbs As Database
Dim tdfTable1 As TableDef
Dim tdfTable2 As TableDef
Dim rel As Relation
Set dbs = CurrentDb
With dbs
Set tdfTable1 = .TableDefs!Activity_File
Set tdfTable2 = .TableDefs!Logon_Names
rel.Fields.Append rel.CreateField("Computer Name"

rel.Fields!Logon_Names.ForeignName = "Computer Name"
.Relations.Append rel
.Close
Set rel = .CreateRelation("ComputerLogons", _
tdfTable1.Name, tdfTable2.Name, _
dbRelationDontEnforce)
.Relations.Append rel
.Close
End With
End Sub
When I try to run the code I receive:
Compile Error
User-define type not defined.
It points to:
Dim dbs As Database
Any help would greatly be appriciated.
Thank you for everything.
Shane