473,699 Members | 2,323 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Access 2000 - Can I not link 1 Master Field to multiple Child Fields???

Ok'
I have 2 tables.
The first being my main table where each record has a 'FigureID' txt
box. (Indexed - No duplicates)
The second being my sub table where reporting is entered for these
Figures. Sometimes more than one at a time. I have 4 'FigureID' txt
boxes on this subtable.(All Indexed - Duplicates OK)

When I set the Master/Child link for the first FigureID on the
Subtable I have no problems.
The subtable shows all the records with the same FigureID.

Then when I add the 2nd,3rd & 4th relationships, it doesnt work.

The subtable shows records that dont exist (autonumber = autonumber).
& the 2nd,3rd & 4th FigureID's are auto-populated as the FigureID from
the main table?
The first FigureID on the subtable is blank?

Can I not link 1 Master Field to multiple Child Fields???

Any help would be greatly appreciated'
Ryan
pa****@gmail.co m

Feb 6 '07 #1
13 8291
pa****@gmail.co m wrote:
Ok'
I have 2 tables.
The first being my main table where each record has a 'FigureID' txt
box. (Indexed - No duplicates)
The second being my sub table where reporting is entered for these
Figures. Sometimes more than one at a time. I have 4 'FigureID' txt
boxes on this subtable.(All Indexed - Duplicates OK)
This is where you went wrong. Your second table should have its own Primary
Key and then a single foreign key field to relate back to the parent table.
Then each sub-record has exactly one FigureID value. With this setup you
can have zero, one, or multiple child records in the second table that
relate to a single record in the main table.
--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com
Feb 6 '07 #2
The Subtable does have a primary key for each record - <ReportID>
You lost me on the single foreign key though...
Each SubRecord (Report) needs to have multiple FigureID values because
the reports usually cover more than one figure.

Here is what is in the 'Subform/Report: page after the Subform Field
Linker
Link Child Fields....... FigID;FigID2;Fi gID3;FigID4;Fig ID5
Link Master FIelds..... FigureID;Figure ID;FigureID;Fig ureID;FigureID
<same repeated>

Therefore there are many master records for each child record.

Thanks'
On Feb 6, 9:27 am, "Rick Brandt" <rickbran...@ho tmail.comwrote:
paq...@gmail.co m wrote:
Ok'
I have 2 tables.
The first being my main table where each record has a 'FigureID' txt
box. (Indexed - No duplicates)
The second being my sub table where reporting is entered for these
Figures. Sometimes more than one at a time. I have 4 'FigureID' txt
boxes on this subtable.(All Indexed - Duplicates OK)

This is where you went wrong. Your second table should have its own Primary
Key and then a single foreign keyfieldto relate back to the parent table.
Then each sub-record has exactly one FigureID value. With this setup you
can have zero, one, ormultiplechild records in the second table that
relate to a single record in the main table.

--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com

Feb 7 '07 #3
Your structures don't sound correct. In fact they almost sound as if
they are reversed from what they should be.

Show us in more detail what your two tables look like.

Ron

Feb 7 '07 #4
On Feb 7, 9:02 am, "Ron2006" <ronne...@hotma il.comwrote:
Your structures don't sound correct. In fact they almost sound as if
they are reversed from what they should be.

Show us in more detail what your two tables look like.

Ron
Actually, no they arent reversed...

The Main Tables records are the 'core' of the Database. Users are
responsible for the individual records indexed by there 'Figure ID #'.
These records are static, showing the current status..

Another group does reporting for the first group & these can relate to
more than one Figure at a time, hence the child records can affect
more than 1 master record at a time.
These reports are not "open" all the time, they happen on specific
dates & then are done, hence they are not the Main Table.

When the user from the (Main Table)group checks the database, I want
them to be able to see all the reporting done that affects their
figures via a Subform. I would link these child records to the master
records by the Figure ID.

I can do this for 1 FigureID, but not for multiple ones. When I add
the additional links, Access disregards the '2nd/3rd/4th' ID's. The
subform record that shows up is 'non-existant' (autonumber =
autonumber). & the 2nd/3rd/4th fields in the subform become
autopopulated with the FigureID from the Main Table???
Hope this clears it up'
Thanks'

Feb 7 '07 #5
What is the structure of the tables?

Feb 7 '07 #6
On Feb 7, 10:01 am, "Ron2006" <ronne...@hotma il.comwrote:
What is the structure of the tables?
Main Table
ID - autonumber
FigureID - text
Status - - text
Last Updated - date
Property - text
TWP- text
Priority - text
Owner - text
Current Request - text
Figure Description - text
Comments - text
etc...
Subtable
ID - Autonumber
Property- text
FigureID- text
FigureID2 - text
FigureID3- text
FigureID4 - text
FigureID5- text
FigureID6 - text
Report Date - Date
Reportee - text
ReportText - text
ReportTextCont1 - text
ReportTextCont2 - text
ReportDiagram1 - OLE
ReportDiagram2 - OLE
ReportDiagram3 - OLE

Not sure why you need this info, the FigureID's are all the same
format.
Feb 7 '07 #7
Rick, Maybe you can explain it better......

Feb 7 '07 #8
On Feb 7, 10:54 am, "Ron2006" <ronne...@hotma il.comwrote:
Rick, Maybe you can explain it better......
What do you need to know???

On the Main Table, each record has a "FigureID". (Indexed - No
Duplicates)
On the Subtable each record can have Multiple "FigureID's ". (The
ReportID is what is indexed here)
I just want the Main table's Form to show in the subform all the
subtable records (reports) that have any FigureID's related to the
Main records FigureID#.

Feb 7 '07 #9

That is where the design departs from the standard. On the "sub"
table there should only be one FigureID and there should be multiple
records (one for each of the IDs that you have there.) That way you
will get exactly what you want AND the day that you need to go more
than 6 you can handle it with out any changes.

The closest way you can handle it now (and it will not allow any
updates to the information in the sub table) is to use a UNION query.
essentially you will create a query defintion of

MatchFigureID - text
Report Date - Date
Reportee - text
ReportText - text
ReportTextCont1 - text
ReportTextCont2 - text
ReportDiagram1 - OLE
ReportDiagram2 - OLE
ReportDiagram3 - OLE

and the data behind the MatchFigureID for each will be FigureID1 for
one record and ID1 for the second, etc.

Sort of like this if you look at the sql view for A NEW Matched query:

SELECT subtable.[FigureID] AS MatchFigureID, subtable.[ReportDate] AS
ReportDate,.... FROM subtable

UNION ALL SELECT subtable.[FigureID2] AS MatchFigureID, subtable.
[ReportDate] AS ReportDate,.... FROM subtable

UNION ALL SELECT subtable.[FigureID3] AS MatchFigureID, subtable.
[ReportDate] AS ReportDate,.... FROM subtable

UNION ALL SELECT subtable.[FigureID4] AS MatchFigureID, subtable.
[ReportDate] AS ReportDate,.... FROM subtable

UNION ALL SELECT subtable.[FigureID5] AS MatchFigureID, subtable.
[ReportDate] AS ReportDate,.... FROM subtable

UNION ALL SELECT subtable.[FigureID6] AS MatchFigureID, subtable.
[ReportDate] AS ReportDate,.... FROM subtable
And then use this query in the child subform and use MatchFigureID as
the matching field.
Now the day you need more than 6 the table and this query all need to
be changed because of the way the table is defined.

Good Luck.

Feb 7 '07 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

49
14340
by: Yannick Turgeon | last post by:
Hello, We are in the process of examining our current main application. We have to do some major changes and, in the process, are questionning/validating the use of MS Access as front-end. The application is relatively big: around 200 tables, 200 forms and sub-forms, 150 queries and 150 repports, 5GB of data (SQL Server 2000), 40 users. I'm wondering what are the disadvantages of using Access as front-end? Other that it's not...
2
3103
by: Terry | last post by:
Hello, I wonder if anyone can shed light on this problem for me. I have an Access 97 front end with an SQL 2000 database. There is a Business main form with an Owner subform and corresponding tables of the same names. A third table BusinessRel records the BusinessID (linked to Business table) and OwnerID (linked to Owner table). This is what happens when the Business main form is loaded. I enter the BusinessID and other stuff, then as...
1
2075
by: Terry | last post by:
Hello, Has anyone experienced the following problem following an Upsize from Access 97 to SQL 2000 using the MS Upsize Wizard? Or can anyone see what the problem might be. Before Upsize (Access 97 front end and Access 97 tables): A MainForm loads up correctly and then I enter a ReferenceNumber value in a MainForm field control. I then click on the first field of a SubForm, the ReferenceNumber then shows at the top of the SubForm and...
2
6253
by: Frav | last post by:
The Reps team have been experiencing that Access 2002 unexpectedly quits while working and also lots of Corruption Failures and "Record lock can not update" messages since the upgrade from Windows 2000 and Access 200 to Windows XP and Access 2002 (XP) was done. Now, they are working and at anytime in anywhere of the application access unexpectedly quits with no error messages and the info that was being entered
4
2656
by: Don Do | last post by:
Help I built a form/subform/subsubform setup using the access forms wizard. I have a table1 = parent, table2 = child, table3 = (grandchild?). There will be multiple records in table2 that tie to table1, and multiple records in table 3 that tie to table2. Both on "1 to many" joins. Each of the forms are bound to the fields in the respective tables. The subform & subsubform are datasheet view. When I enter any data, I
7
7889
by: wwwords | last post by:
I have a form in Access 2007 containing a subform. The control source of the latter is SELECT DISTINCTROW ., ., ., ., . FROM ; which is undoubtedly correct. However, if I click on the down arrow on the subform header (the one that should bring up the sort and filter menu) I get this error:
1
2197
by: wendy184 | last post by:
I'm used to using 2007 which allows multiple values in the lookup wizard, this helps hugely with my queries as the database i'm building has information on one parent who may have up to 5 kids. Now i'm building up a similar database in 2000 and could really use some help, 2000 won't allow multiple values in a lookup field which means if I have a parent who has more than one kid I cant store the details, I have a seperate table for both parent...
1
8634
by: Yubin | last post by:
Hello, I'm new to the forums and I wasn't able to find anything in my searches so here we are. I have a DB with a many-2-many relationship. I have a form that has 3 comboboxes: Project #, Last Name, Active(Yes/No) I have a subform that uses Project# as a Child and Master link. I want to use all three exclusively to give the user the option to search using any ONE of the three, but when I add all three to the Child and Master link fields no...
12
3025
by: banderson | last post by:
Hello all, I am hoping that you can help me with a problem that has occurred numerous times on various forms in the two databases that I am working on. When I first add a subform to a form linking child and master fields (primary key and foreign key), the subform will automatically update when the master field on the main form is changed (it is in a combo box). However, when I work more on the form - making it a bit more complicated, adding...
0
8620
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9180
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9038
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
7755
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5877
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4633
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3060
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2351
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2012
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.