Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Set up relations between 2 entities (Access 2k, VB6)

Status
Not open for further replies.

gwar2k1

Programmer
Apr 17, 2003
387
GB
Hey, Im having troubles setting up relations using keys in Access 2000. This is the code i have:

Dim FolderRelation As New Relation
'FolderRelation.ForeignTable = DbaseCat.Tables("Customer")
'FolderRelation.Table = DbaseCat.Tables("CustomerProduct")
FolderRelation.Name = "Order"
'FolderRelation.Fields.Append "Folder"

Everything is commented out because at run time it says "Type miss match error" So im stumped, how can it be a type error when the variable is set as a relation?

Im probabally doing this totally wrong as Im doing it without direction and I cant find a good tutorial online, hence the numerous questions on this board.

If it helps:

I have 3 entities: Product, Customer, CustomerProduct
Product has a primary key: "EAN 8/13"
Customer has a primary key: "Folder"
CustomerProduct has a compound key: "Order ID", "Folder", "Product"

CustomerProduct resolves a many to many relationship so customer and product both go one to many to customerproduct

A point in the right direction would be nice =)

TIA

~*Gwar3k1*~
"To the pressure, everything's just like: an illusion. I'll be losing you before long..."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top