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
  #21  
Old January 14th, 2009, 12:55 AM posted to microsoft.public.access.tablesdbdesign
John W. Vinson
external usenet poster
 
Posts: 18,261
Default data is repeating itself

On Tue, 13 Jan 2009 12:09:01 -0800, tboyce
wrote:

Have you made any sense of my last post John? Or have you give up on me? If
you feel my post has gone too far off the original problem could you direct
me to a post that may help me further. Many thanks for your assistance
regardless.


Ummmm... I thought I had responded to the issues in your last post. Do you
have any thoughts about *my* suggestions?

You need to establish RI, and otherwise get your table structures correct.
Your forms will continue to cause problems if you don't.
--

John W. Vinson [MVP]
  #22  
Old January 18th, 2009, 01:46 PM posted to microsoft.public.access.tablesdbdesign
tboyce
external usenet poster
 
Posts: 32
Default data is repeating itself



"John W. Vinson" wrote:

On Tue, 13 Jan 2009 12:09:01 -0800, tboyce
wrote:

Have you made any sense of my last post John? Or have you give up on me? If you feel my post has gone too far off the original problem could you direct me to a post that may help me further. Many thanks for your assistance regardless.


Ummmm... I thought I had responded to the issues in your last post. Do you
have any thoughts about *my* suggestions?

You need to establish RI, and otherwise get your table structures correct.
Your forms will continue to cause problems if you don't.

John W. Vinson [MVP]


I tried to answer your questions as you did mine, paragraph by paragraph so that u could make more sense out of them. I have set the RI on all the relationships throughout. My field size is set at eight with text properties throughout my tables. (I wont mention forms again). All the tables are 1 to many on the registration field. It is only this one single table that is causing me problems. I followed all your guidelines and am flummoxed an this problem. How can i ensure the structure is set up properly?

  #23  
Old January 18th, 2009, 09:59 PM posted to microsoft.public.access.tablesdbdesign
tboyce
external usenet poster
 
Posts: 32
Default data is repeating itself

I dont know if this will help you figure out what going on. I tried an
experiment on my forms to see what would happen. I included the reg field
from my servicing and maintenance forms and they were duplicating the reg on
my main Vehicle Details form but on the Inventory form the reg field was
blank throughout the fleet. Does this help explain why is this happening?

"tboyce" wrote:



"John W. Vinson" wrote:

On Tue, 13 Jan 2009 12:09:01 -0800, tboyce
wrote:

Have you made any sense of my last post John? Or have you give up on me? If you feel my post has gone too far off the original problem could you direct me to a post that may help me further. Many thanks for your assistance regardless.


Ummmm... I thought I had responded to the issues in your last post. Do you
have any thoughts about *my* suggestions?

You need to establish RI, and otherwise get your table structures correct.
Your forms will continue to cause problems if you don't.

John W. Vinson [MVP]


I tried to answer your questions as you did mine, paragraph by paragraph so that u could make more sense out of them. I have set the RI on all the relationships throughout. My field size is set at eight with text properties throughout my tables. (I wont mention forms again). All the tables are 1 to many on the registration field. It is only this one single table that is causing me problems. I followed all your guidelines and am flummoxed an this problem. How can i ensure the structure is set up properly?

  #24  
Old January 19th, 2009, 01:52 AM posted to microsoft.public.access.tablesdbdesign
John W. Vinson
external usenet poster
 
Posts: 18,261
Default data is repeating itself

On Sun, 18 Jan 2009 13:59:13 -0800, tboyce
wrote:

I dont know if this will help you figure out what going on. I tried an
experiment on my forms to see what would happen. I included the reg field
from my servicing and maintenance forms and they were duplicating the reg on
my main Vehicle Details form but on the Inventory form the reg field was
blank throughout the fleet. Does this help explain why is this happening?


Here are your questions and my answers to which I have not seen a response.
Maybe the web interface was losing some posts (it does that at times).

Quoting:

I have
set a registration number field in each sub table and linked each table to
the main form via the registration number. Each table has a primary key of an
auto number field. The relationship is a 1 to many on all the relationships i
have set up, with no ref integrity on any to the registration number.


Why not? A relationship without referential integrity is no relationship at
all, other than cosmetically. It makes no sense to talk about maintenance work
on a nonexistant truck... if you are billed for such work, you should contact
a good lawyer!!! Establish RI.

All the
other sub forms work fine except this inventory sub form. On the main form
when i click on the sub form of the inventory form it has a test entry say 2
x wheel straps on the first entry . But when i change to main form to view
another vehicle and click the inventory form. Each vehicle has 2x wheel
straps even though i haven't entered that data into any of them as yet. When
i go into the inventory table the data is shown only once but the
registration has not been recorded for the 1 vehicle that i tried entering
the data for.


That just about convinces me that the Master Link Field and Child Link Field
properties of this subform are either blank, or erroneous. Doublecheck that
the datatype and size of the Registration Number field matches in the truck
table and the inventory table. While you're at it, make sure RI is enforced on
this relationship. You might need to create a record for a "non-truck truck"
if you have an inventory of parts that don't belong to any particular truck; I
would expect that you might have a stock of windshield wipers and chains and
ground straps that could be put onto any truck, right???

Then, try *deleting the subform control* from your mainform. Compact and
repair the database. Then drag the Inventory form from the forms window onto
the main form (to establish it as a subform). Make sure that the registration
number is used as the master/child link field. This should keep the subform in
synch.


End Quote


Just so I understand: Do the items in the Inventory BELONG TO A TRUCK?

IF NOT... then the Reg number *should simply not exist* in the Inventory
table. A one to many relationship implies that there is a relationship. If the
inventory and the trucks are independent - if there is no connection between a
particular truck and a particular strap or wiper or air filter in the
inventory - then there *is no relationship* and a Master/Child link is
inappropriate.
--

John W. Vinson [MVP]
  #25  
Old January 19th, 2009, 11:31 PM posted to microsoft.public.access.tablesdbdesign
tboyce
external usenet poster
 
Posts: 32
Default data is repeating itself



"John W. Vinson" wrote:

On Sun, 18 Jan 2009 13:59:13 -0800, tboyce
wrote:

I dont know if this will help you figure out what going on. I tried an
experiment on my forms to see what would happen. I included the reg field
from my servicing and maintenance forms and they were duplicating the reg on
my main Vehicle Details form but on the Inventory form the reg field was
blank throughout the fleet. Does this help explain why is this happening?


Here are your questions and my answers to which I have not seen a response.
Maybe the web interface was losing some posts (it does that at times).

Quoting:

I have
set a registration number field in each sub table and linked each table to
the main form via the registration number. Each table has a primary key of an
auto number field. The relationship is a 1 to many on all the relationships i
have set up, with no ref integrity on any to the registration number.


Why not? A relationship without referential integrity is no relationship at
all, other than cosmetically. It makes no sense to talk about maintenance work
on a nonexistant truck... if you are billed for such work, you should contact
a good lawyer!!! Establish RI.

All the
other sub forms work fine except this inventory sub form. On the main form
when i click on the sub form of the inventory form it has a test entry say 2
x wheel straps on the first entry . But when i change to main form to view
another vehicle and click the inventory form. Each vehicle has 2x wheel
straps even though i haven't entered that data into any of them as yet. When
i go into the inventory table the data is shown only once but the
registration has not been recorded for the 1 vehicle that i tried entering
the data for.


That just about convinces me that the Master Link Field and Child Link Field
properties of this subform are either blank, or erroneous. Doublecheck that
the datatype and size of the Registration Number field matches in the truck
table and the inventory table. While you're at it, make sure RI is enforced on
this relationship. You might need to create a record for a "non-truck truck"
if you have an inventory of parts that don't belong to any particular truck; I
would expect that you might have a stock of windshield wipers and chains and
ground straps that could be put onto any truck, right???

Then, try *deleting the subform control* from your mainform. Compact and
repair the database. Then drag the Inventory form from the forms window onto
the main form (to establish it as a subform). Make sure that the registration
number is used as the master/child link field. This should keep the subform in
synch.


End Quote


Just so I understand: Do the items in the Inventory BELONG TO A TRUCK?

Yes that is my intention. The Equipment table holds all the equipment
available to the fleet. The Inventory table is the equipment that each truck
should have to hand each day. When the amount of equipment falls below the
requirement then i will order more for that truck. So if two trucks need 2
winch cables each i would be required to order at least four cables. if a
driver goes out with 1 short then we would possibly give him extra training
to ensure he is doing his vehicle checks properly to go about his daily
duties with the correct equipment. So that why i try to get this corrected.

IF NOT... then the Reg number *should simply not exist* in the Inventory
table. A one to many relationship implies that there is a relationship. If the
inventory and the trucks are independent - if there is no connection between a
particular truck and a particular strap or wiper or air filter in the
inventory - then there *is no relationship* and a Master/Child link is
inappropriate.
--

John W. Vinson [MVP]

  #26  
Old March 30th, 2009, 09:03 PM posted to microsoft.public.access.tablesdbdesign
tboyce
external usenet poster
 
Posts: 32
Default data is repeating itself

Hi again still got same problem. The answers to questions being asked are
There aren't any queries involved in these forms.
The data is not duplicated in any tables concerned but in the inventory
table there is no record of the reg of the truck invloved when i enter data
through the sub form (Inventory) on the main form (Vehicle Details). I.e when
i scroll through the records on the other sub forms i get the data relevant
to that vehicle reg as it should be. When i scroll through each Vehicle with
the inventory sub displayed i see the same data being displayed on each
vehicle even if that vehicle inventory has not been entered as yet.
When i look in the inventory table there is only one entry in the table but
the reg field which is my link field is blank when it should read "A4 SCO"
the vehicle i assigned that piece of equipment to.

When i try to display the SQL recordsource it asks me if i want to invoke
the query builder to which i have said yes to but only gives this statement

SELECT
FROM [Vehicle Details];

and the sub
SELECT
FROM [Inventory];

I set ref integrity on this relationship and that gave me the 1 - many
symbol the relaionship seems ok to me. Any ideas anyone


"John W. Vinson" wrote:

On Fri, 9 Jan 2009 14:07:01 -0800, tboyce
wrote:

I am sorry if i am being thick here. I am trying to say the "Vehicle
Registration" is my Master/Child link to the Sub Form. As it is with all the
Sub forms that I have set up. All the others are ok and this relationship is
the same as all the others so what am i doing wrong?


This may be repeating, but I haven't seen these particular questions answered:

What is the Recordsource of the mainform? Please post the SQL.
What is the Recordsource of the subform? Please post the SQL.
If you open the Recordsource query for the main form do you see repeating data
for each vehicle registration number?
Ditto for the child form?
--

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 02:15 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.