Click here to Skip to main content
15,881,715 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
First, I am very new to VBA but have a little experience with MS Access as a light user.

I am trying to setup a Bill of Materials (BoM) and have found a nice template data base (.mdb) that I have successfully converted to .accdb and it works great.

It uses an "Adjacency List" table to input the BoM and if there are no circular references then all works fine and it flattens it providing the data in a format I can use.

Unfortunately the data I must use (thousands of records) has circular references in it and Access crashes when I try to use my data in it. I don't know why the data is like that except that the originator is using it differently than I need to use it.

The basic problem simplified is like the following:

Parent / Child
1 / 2
1 / 3
2 / 4
2 / 5
5 / 6
5 / 2

Can some one help me out with some MS Access VBA code to correct this circular reference issue that I could run prior to running the Function (or inside the function) that imports and flattens the Adjacency List raw data I start with?

My hope is that I can incorporate some VBA code in the Function from the template database and always have it corrected for this type of circular reference.

Thanks.
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900