If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
data is repeating itself
I have set up a DB for our Transport Managment Dept. Containing a main table
holding our trucks details (Vehicle Details). I have created a Servicing, Maintenance, Inventory, Equipment, Defects and Equipment tables. I have created a Single Main form with sub forms for all the tables. Everything seems fine with all the tables except Inventory subform. If i enter data under one Registration, that entry is duplicated across the fleet and when i delete that entry so do all the other 13 entries. I have checked the relationships which is the same throughout all relationships (To Registration Number) and includes all records and only those to the reg to show up in all of them. I have only one Primary Key in each table which is an Auto number, with the Reg as a Foreign Key ( I Think!!). What am i doing wrong with this one table for it to duplicate data in this way. Many thanks to all you people out there that spend an age helping others like little me! |
#2
|
|||
|
|||
data is repeating itself
It sounds like you have not correctly set up the
LinkMasterFields/LinkChildFields properties of your subform control. Check in the table that stores the Inventory records. Are there really duplicate records in there, or are there just records with no VehicleID foreign key value? -- Good Luck :-) Graham Mandeno [Access MVP] Auckland, New Zealand "tboyce" wrote in message ... I have set up a DB for our Transport Managment Dept. Containing a main table holding our trucks details (Vehicle Details). I have created a Servicing, Maintenance, Inventory, Equipment, Defects and Equipment tables. I have created a Single Main form with sub forms for all the tables. Everything seems fine with all the tables except Inventory subform. If i enter data under one Registration, that entry is duplicated across the fleet and when i delete that entry so do all the other 13 entries. I have checked the relationships which is the same throughout all relationships (To Registration Number) and includes all records and only those to the reg to show up in all of them. I have only one Primary Key in each table which is an Auto number, with the Reg as a Foreign Key ( I Think!!). What am i doing wrong with this one table for it to duplicate data in this way. Many thanks to all you people out there that spend an age helping others like little me! |
#3
|
|||
|
|||
data is repeating itself
It almost sounds like the master/child properties have not been created
correctly in the forms. "tboyce" wrote: I have set up a DB for our Transport Managment Dept. Containing a main table holding our trucks details (Vehicle Details). I have created a Servicing, Maintenance, Inventory, Equipment, Defects and Equipment tables. I have created a Single Main form with sub forms for all the tables. Everything seems fine with all the tables except Inventory subform. If i enter data under one Registration, that entry is duplicated across the fleet and when i delete that entry so do all the other 13 entries. I have checked the relationships which is the same throughout all relationships (To Registration Number) and includes all records and only those to the reg to show up in all of them. I have only one Primary Key in each table which is an Auto number, with the Reg as a Foreign Key ( I Think!!). What am i doing wrong with this one table for it to duplicate data in this way. Many thanks to all you people out there that spend an age helping others like little me! |
#4
|
|||
|
|||
data is repeating itself
On Jan 7, 5:01*pm, tboyce wrote:
I have set up a DB for our Transport Managment Dept. Containing a main table holding our trucks details (Vehicle Details). I have created a Servicing, Maintenance, Inventory, Equipment, Defects and Equipment tables. I have created a Single Main form with sub forms for all the tables. Everything seems fine with all the tables except Inventory subform. If i enter data under one Registration, that entry is duplicated across the fleet and when i delete that entry so do all the other 13 entries. I have checked the relationships which is the same throughout all relationships (To Registration Number) and includes all records and only those to the reg to show up in all of them. I have only one Primary Key in each table which is an Auto number, with the Reg as a Foreign Key ( I Think!!). What am i doing wrong with this one table for it to duplicate data in this way. Many thanks to all you people out there that spend an age helping others like little me! sounds like something's wrong with that subform. The LinkChild and LinkMaster properties are set and this still happens? Did you enforce referential integrity between the two tables in the relationships window? To check the source of the problem, open the table and see how many entries are in it. If that's the number of subform/child records for every record in the main form, then that's the problem. |
#5
|
|||
|
|||
data is repeating itself
U hit the nail on the head there are not duplicate entries in the inventory
table, only one entry but no reg entered as i entered into the sub form of the vehicle detail form ( Main form) so what have i not done right? Nice 1 "Graham Mandeno" wrote: It sounds like you have not correctly set up the LinkMasterFields/LinkChildFields properties of your subform control. Check in the table that stores the Inventory records. Are there really duplicate records in there, or are there just records with no VehicleID foreign key value? -- Good Luck :-) Graham Mandeno [Access MVP] Auckland, New Zealand "tboyce" wrote in message ... I have set up a DB for our Transport Managment Dept. Containing a main table holding our trucks details (Vehicle Details). I have created a Servicing, Maintenance, Inventory, Equipment, Defects and Equipment tables. I have created a Single Main form with sub forms for all the tables. Everything seems fine with all the tables except Inventory subform. If i enter data under one Registration, that entry is duplicated across the fleet and when i delete that entry so do all the other 13 entries. I have checked the relationships which is the same throughout all relationships (To Registration Number) and includes all records and only those to the reg to show up in all of them. I have only one Primary Key in each table which is an Auto number, with the Reg as a Foreign Key ( I Think!!). What am i doing wrong with this one table for it to duplicate data in this way. Many thanks to all you people out there that spend an age helping others like little me! |
#6
|
|||
|
|||
data is repeating itself
On Wed, 7 Jan 2009 15:01:25 -0800, tboyce
wrote: If i enter data under one Registration, that entry is duplicated across the fleet and when i delete that entry so do all the other 13 entries. Did you perhaps base one of the forms on a Query joining the two tables? Don't: the mainform should be based on the "one" side table (Fleet?) and the subform on the "many". -- John W. Vinson [MVP] |
#7
|
|||
|
|||
data is repeating itself
No i haven't based any of the forms on queries. Does that all the sub forms
are all built the same way. There is only 1 index under each table and all the relationships are one to many that seem ok. Thanx for ur assistance John "John W. Vinson" wrote: On Wed, 7 Jan 2009 15:01:25 -0800, tboyce wrote: If i enter data under one Registration, that entry is duplicated across the fleet and when i delete that entry so do all the other 13 entries. Did you perhaps base one of the forms on a Query joining the two tables? Don't: the mainform should be based on the "one" side table (Fleet?) and the subform on the "many". -- John W. Vinson [MVP] |
#8
|
|||
|
|||
data is repeating itself
Can u help me any further??
"tboyce" wrote: No i haven't based any of the forms on queries. Does that all the sub forms are all built the same way. There is only 1 index under each table and all the relationships are one to many that seem ok. Thanx for ur assistance John "John W. Vinson" wrote: On Wed, 7 Jan 2009 15:01:25 -0800, tboyce wrote: If i enter data under one Registration, that entry is duplicated across the fleet and when i delete that entry so do all the other 13 entries. Did you perhaps base one of the forms on a Query joining the two tables? Don't: the mainform should be based on the "one" side table (Fleet?) and the subform on the "many". -- John W. Vinson [MVP] |
#9
|
|||
|
|||
data is repeating itself
Sorry, I thought you'd solved it.
You need to set the LinkMasterFields/LinkChildFields properties of your subform control. LinkMasterFields should be the name of a control on your main form that is bound to the primary key. LinkChildFields is the name of the field in your subform's recordsource that contains the related (foreign) key. -- Good Luck :-) Graham Mandeno [Access MVP] Auckland, New Zealand "tboyce" wrote in message ... U hit the nail on the head there are not duplicate entries in the inventory table, only one entry but no reg entered as i entered into the sub form of the vehicle detail form ( Main form) so what have i not done right? Nice 1 "Graham Mandeno" wrote: It sounds like you have not correctly set up the LinkMasterFields/LinkChildFields properties of your subform control. Check in the table that stores the Inventory records. Are there really duplicate records in there, or are there just records with no VehicleID foreign key value? -- Good Luck :-) Graham Mandeno [Access MVP] Auckland, New Zealand "tboyce" wrote in message ... I have set up a DB for our Transport Managment Dept. Containing a main table holding our trucks details (Vehicle Details). I have created a Servicing, Maintenance, Inventory, Equipment, Defects and Equipment tables. I have created a Single Main form with sub forms for all the tables. Everything seems fine with all the tables except Inventory subform. If i enter data under one Registration, that entry is duplicated across the fleet and when i delete that entry so do all the other 13 entries. I have checked the relationships which is the same throughout all relationships (To Registration Number) and includes all records and only those to the reg to show up in all of them. I have only one Primary Key in each table which is an Auto number, with the Reg as a Foreign Key ( I Think!!). What am i doing wrong with this one table for it to duplicate data in this way. Many thanks to all you people out there that spend an age helping others like little me! |
#10
|
|||
|
|||
data is repeating itself
I have checked the relationship which is based on the Vehicle Reg Field in
both tables as it is with all the other sub tables to the main form. All the Reg fields are set to Integer with a field size of 8. All seems to be the same detail throughout the tables, except the inventory. But as you said when i enter data via the sub form and check to Inventory table the reg field is blank. Does this help you any? Thanx again. "tboyce" wrote: Can u help me any further?? "tboyce" wrote: No i haven't based any of the forms on queries. Does that all the sub forms are all built the same way. There is only 1 index under each table and all the relationships are one to many that seem ok. Thanx for ur assistance John "John W. Vinson" wrote: On Wed, 7 Jan 2009 15:01:25 -0800, tboyce wrote: If i enter data under one Registration, that entry is duplicated across the fleet and when i delete that entry so do all the other 13 entries. Did you perhaps base one of the forms on a Query joining the two tables? Don't: the mainform should be based on the "one" side table (Fleet?) and the subform on the "many". -- John W. Vinson [MVP] |
Thread Tools | |
Display Modes | |
|
|