473,405 Members | 2,373 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Many to Many record links within 1 table

I've created a Table and wish to create links between the records wtihin the table.

Background: The table consists of a list of Documents. These documents contain references to other documents...which are also listed within this same table. I would like to create a form which will allow me to call up any one 'parent' document, and have it list all the associated child documents.

Issues:
1. The parent and child records are located within the same table
2. Any one record within the table can have zero, 1, or many links to other records within the same table, which in turn can have links to other records...and so on.
3. Any one record can be both a parent and/or a child

Any assistance is appreciated
Jul 7 '06 #1
1 2755
comteck
179 100+
The best way to do it is to create a separate table for your child documents. You then create a link between the 2 tables using an "ID" field. The field should have the same name on both tables, and be the primary key on the main table. Also, this field's datatype should be "autonumber" on the main table, but "number" on the child table.

For example, if you called this field, "RecordID", this would be the primary key on the main table, and its datatype would be autonumber. On the child table, you would create a field with the same name, "RecordID", and its datatype would be number.

On the child table, you can still make this "RecordID" a primary key, but you will need a 2nd primary key for that table if you've got more than one document with the same ID because a primary key cannot be duplicated. A second primary key might be something like "ChildID".

Then finally, on your form, you create a subform. The main part of the form takes information from your main table, and the subform takes info from your child table. Of course, rthe child form will also have to be linked to the main form.

Hope this helped.
comteck
Jul 9 '06 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: jason | last post by:
I could sure use some conceptualization and query help with a Page Watch System I am building in Access 2000 and Asp. I need to cycle through databae and generate a compiliation query email that...
0
by: Ren | last post by:
I don't have to worry about duplicate data within a record because each record is for an individual and nothing is duplicated and all the fields must be entered for each person, so my problem is...
4
by: Ryan | last post by:
Access 2002, Windows XP, 1 Front end MDB, 1 Back end MDB I have a subform which points to a table. Navigating from one record to the next is obviously dead straight forward. However, this seems...
5
by: Don Sealer | last post by:
I have a database that I need to track certain measurements numerous times per day. I need to record several aspects like, length, width, thickness, plus a few other things. I've been recording...
22
by: M K | last post by:
Heres my SP: ( i am trying to add more than 1 field but get the same error no matter how many i try to add, i thought i would try to insert the primary key only and work up from there but the...
22
by: RayPower | last post by:
I'm having problem with using DAO recordset to append record into a table and subsequent code to update other tables in a transaction. The MDB is Access 2000 with the latest service pack of JET 4....
0
by: hagar | last post by:
Hi all, I have a problem which I can not understand why this is happening! Debugging this I actually see that it grabs first record then when stepping through code to the line rsImportTo.AddNew...
1
by: lionelm2007 | last post by:
Hi there, I have two tales that are in one to many relationship. For every ewo (enhanced work order) record there is at least one ewo status record. How do you enforce this constraint in...
4
by: jkwok | last post by:
Hi, I have a table called 'Countries' with country codes, and other related attributes. Countries id country_code full_name rate I have another table, 'Consumption', that links to the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.