A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

data is repeating itself



 
 
Thread Tools Display Modes
  #1  
Old January 7th, 2009, 11:01 PM posted to microsoft.public.access.tablesdbdesign
tboyce
external usenet poster
 
Posts: 32
Default 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  
Old January 7th, 2009, 11:46 PM posted to microsoft.public.access.tablesdbdesign
Graham Mandeno
external usenet poster
 
Posts: 593
Default 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  
Old January 7th, 2009, 11:49 PM posted to microsoft.public.access.tablesdbdesign
Jame
external usenet poster
 
Posts: 9
Default 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  
Old January 8th, 2009, 12:28 AM posted to microsoft.public.access.tablesdbdesign
Piet Linden[_2_]
external usenet poster
 
Posts: 280
Default 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  
Old January 8th, 2009, 01:27 AM posted to microsoft.public.access.tablesdbdesign
tboyce
external usenet poster
 
Posts: 32
Default 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  
Old January 8th, 2009, 02:01 AM posted to microsoft.public.access.tablesdbdesign
John W. Vinson
external usenet poster
 
Posts: 18,261
Default 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  
Old January 8th, 2009, 08:11 AM posted to microsoft.public.access.tablesdbdesign
tboyce
external usenet poster
 
Posts: 32
Default 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  
Old January 9th, 2009, 12:48 AM posted to microsoft.public.access.tablesdbdesign
tboyce
external usenet poster
 
Posts: 32
Default 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  
Old January 9th, 2009, 05:44 AM posted to microsoft.public.access.tablesdbdesign
Graham Mandeno
external usenet poster
 
Posts: 593
Default 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  
Old January 9th, 2009, 03:43 PM posted to microsoft.public.access.tablesdbdesign
tboyce
external usenet poster
 
Posts: 32
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 04:29 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.