Hi,I am using MS Access 2007.Please forgive me if i post a silly question, as i am still new in Access and VBA.
I have 3 tables named CRS, Document and DocumentInCRS.T he CRS record in CRS table might belong to a CRS Open Or CRS Response.In the CRS table there is a field named RESPONSE_TO_CRS ID,if it is a CRS Response, then it must have the Response_TO_CRS ID - these ID might belong to CRS Open or CRS Response.
let say:
CRS01 = CRS Open
CRS03 = CRS Response -> RESPONSE_TO_CRS ID: CRS01
CRS06 = CRS Response -> RESPONSE_TO_CRS ID: CRS03 (but CRS03 response to CRS01)
CRS10 = CRS Response -> RESPONSE_TO_CRS ID: CRS06 (but CRS06 response to CRS03, CRS03 response to CRS01)
I do not know many the times relationship will reach, but would not be more than 10.
The relationships between CRS and Document is many-to-many.DocumentIn CRS table acts as bridge table to link CRS table and Document table together.
For those CRS reponse, I wouldn't store their previous document records in DocumentInCRS again because it is link to their response-to CRS by Response_TO_CRS ID and thus they will contain their response-to CRS document records.However ,if there are new documents added to CRS Response,the record will be added in DocumentInCRS.
Using the SQL statement,I want the result for CRS10 to contain all the document records in CRS06, CRS03, CRS01 and itself.
Same case for CRS06 and CRS03 where I can get all the documents record until CRS01.
Is there a proper way to do this?Hope to hear from you guys as soon as possible because I am really stucked :(
Many thanks
I have 3 tables named CRS, Document and DocumentInCRS.T he CRS record in CRS table might belong to a CRS Open Or CRS Response.In the CRS table there is a field named RESPONSE_TO_CRS ID,if it is a CRS Response, then it must have the Response_TO_CRS ID - these ID might belong to CRS Open or CRS Response.
let say:
CRS01 = CRS Open
CRS03 = CRS Response -> RESPONSE_TO_CRS ID: CRS01
CRS06 = CRS Response -> RESPONSE_TO_CRS ID: CRS03 (but CRS03 response to CRS01)
CRS10 = CRS Response -> RESPONSE_TO_CRS ID: CRS06 (but CRS06 response to CRS03, CRS03 response to CRS01)
I do not know many the times relationship will reach, but would not be more than 10.
The relationships between CRS and Document is many-to-many.DocumentIn CRS table acts as bridge table to link CRS table and Document table together.
For those CRS reponse, I wouldn't store their previous document records in DocumentInCRS again because it is link to their response-to CRS by Response_TO_CRS ID and thus they will contain their response-to CRS document records.However ,if there are new documents added to CRS Response,the record will be added in DocumentInCRS.
Using the SQL statement,I want the result for CRS10 to contain all the document records in CRS06, CRS03, CRS01 and itself.
Same case for CRS06 and CRS03 where I can get all the documents record until CRS01.
Is there a proper way to do this?Hope to hear from you guys as soon as possible because I am really stucked :(
Many thanks
Comment