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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Relationships in Access 2000 with 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.

Background:

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..."
 
Sorry i have to bump this i really need help and cant find anything on google

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

It would appear that you are using a DAO record set. From what I see in the MSDN documentation, this can be easily done using a ADO record set instead.

The MSDN documentation talks about Hierarchical Cursors that allow this type of thing.

Hope this points you in the right direction, good luck

Hubert Hoffman
 
thanks =) ill try

~*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