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  

Relationships??



 
 
Thread Tools Display Modes
  #1  
Old April 23rd, 2005, 01:29 PM
Adam
external usenet poster
 
Posts: n/a
Default Relationships??

1. I have a one-to-many relationship. But everytime i go back to the
relationship window Access automatically creates another relationship using
the same table on the one-side of the relationship and then adds a "_1" to
the end of the table name (making it different table in the relationship
view). Why is it creating this relationship all over again with a slightly
different table name on the one side??

2. I have a form that uses 2 tables (customer and payments) where you track
customer payments. It was working fine. Now when ever i add a new customer to
the customer table, then i go to add a payment record for them in the
payments form by selecting there name from a drop list on the form it doesn't
change the records below on the payments subform. But when i select another
person who was already in the database it looks up there payment records fine
and i can add a payment record for them with no problem??? Can anybody help??
  #2  
Old April 23rd, 2005, 05:17 PM
Ken Snell [MVP]
external usenet poster
 
Posts: n/a
Default

Comments inline...

--

Ken Snell
MS ACCESS MVP

"Adam" wrote in message
...
1. I have a one-to-many relationship. But everytime i go back to the
relationship window Access automatically creates another relationship
using
the same table on the one-side of the relationship and then adds a "_1" to
the end of the table name (making it different table in the relationship
view). Why is it creating this relationship all over again with a slightly
different table name on the one side??


That "_1" table is a copy of the original table. In order for ACCESS to
display a relationship between two tables where at least one of the linking
fields is used in more than one relationship between the two tables, ACCESS
creates a copy of the table (and names it by adding "_1" or "_2" to the
table's name) in the Relationships window. ACCESS also will do this if you
create a separate join in a query between the two tables and that one field
is used in that "query" relationship. In other words, what you're seeing is
normal and should be left alone.



2. I have a form that uses 2 tables (customer and payments) where you
track
customer payments. It was working fine. Now when ever i add a new customer
to
the customer table, then i go to add a payment record for them in the
payments form by selecting there name from a drop list on the form it
doesn't
change the records below on the payments subform. But when i select
another
person who was already in the database it looks up there payment records
fine
and i can add a payment record for them with no problem??? Can anybody
help??


Are you talking about data entry in a form? or directly in the table? Your
terminology is inconsistent here. If you're talking about a form and
subform, then I'm guessing that the subform control is not linked to the
main form via the subform control's LinkMasterFields and LinkChildFields
property, so the form is not inserting the correct foreign key field value
into the child table. But, to provide more info, you'll need to give us more
details.


  #3  
Old April 24th, 2005, 01:22 PM
Adam
external usenet poster
 
Posts: n/a
Default

Yes Ken I have talking about a Form and Subform. In the main form the data
comes from a table called customers...in the subform the data comes from a
table called payments. When ever you select a customers name in the main
form, the subform displays all the payment records for that customer.

Currently any old customers that are in the table work fine - i pick the
name and the records int he sub form show. But for any new customers i add it
just doesn't show there payment records...

"Ken Snell [MVP]" wrote:

Comments inline...

--

Ken Snell
MS ACCESS MVP

"Adam" wrote in message
...
1. I have a one-to-many relationship. But everytime i go back to the
relationship window Access automatically creates another relationship
using
the same table on the one-side of the relationship and then adds a "_1" to
the end of the table name (making it different table in the relationship
view). Why is it creating this relationship all over again with a slightly
different table name on the one side??


That "_1" table is a copy of the original table. In order for ACCESS to
display a relationship between two tables where at least one of the linking
fields is used in more than one relationship between the two tables, ACCESS
creates a copy of the table (and names it by adding "_1" or "_2" to the
table's name) in the Relationships window. ACCESS also will do this if you
create a separate join in a query between the two tables and that one field
is used in that "query" relationship. In other words, what you're seeing is
normal and should be left alone.



2. I have a form that uses 2 tables (customer and payments) where you
track
customer payments. It was working fine. Now when ever i add a new customer
to
the customer table, then i go to add a payment record for them in the
payments form by selecting there name from a drop list on the form it
doesn't
change the records below on the payments subform. But when i select
another
person who was already in the database it looks up there payment records
fine
and i can add a payment record for them with no problem??? Can anybody
help??


Are you talking about data entry in a form? or directly in the table? Your
terminology is inconsistent here. If you're talking about a form and
subform, then I'm guessing that the subform control is not linked to the
main form via the subform control's LinkMasterFields and LinkChildFields
property, so the form is not inserting the correct foreign key field value
into the child table. But, to provide more info, you'll need to give us more
details.



  #4  
Old April 24th, 2005, 06:14 PM
Ken Snell [MVP]
external usenet poster
 
Posts: n/a
Default

Are the main form and subform linked by the LinkMasterFields and
LinkChildFields?

Is AllowAdditions property set to Yes for the form that is being used as the
subform? If not, change the value; without it, unless there are payments
already in the table, the subform will not show a blank record to allow you
to enter payments.

--

Ken Snell
MS ACCESS MVP

"Adam" wrote in message
...
Yes Ken I have talking about a Form and Subform. In the main form the data
comes from a table called customers...in the subform the data comes from a
table called payments. When ever you select a customers name in the main
form, the subform displays all the payment records for that customer.

Currently any old customers that are in the table work fine - i pick the
name and the records int he sub form show. But for any new customers i add
it
just doesn't show there payment records...

"Ken Snell [MVP]" wrote:

Comments inline...

--

Ken Snell
MS ACCESS MVP

"Adam" wrote in message
...
1. I have a one-to-many relationship. But everytime i go back to the
relationship window Access automatically creates another relationship
using
the same table on the one-side of the relationship and then adds a "_1"
to
the end of the table name (making it different table in the
relationship
view). Why is it creating this relationship all over again with a
slightly
different table name on the one side??


That "_1" table is a copy of the original table. In order for ACCESS to
display a relationship between two tables where at least one of the
linking
fields is used in more than one relationship between the two tables,
ACCESS
creates a copy of the table (and names it by adding "_1" or "_2" to the
table's name) in the Relationships window. ACCESS also will do this if
you
create a separate join in a query between the two tables and that one
field
is used in that "query" relationship. In other words, what you're seeing
is
normal and should be left alone.



2. I have a form that uses 2 tables (customer and payments) where you
track
customer payments. It was working fine. Now when ever i add a new
customer
to
the customer table, then i go to add a payment record for them in the
payments form by selecting there name from a drop list on the form it
doesn't
change the records below on the payments subform. But when i select
another
person who was already in the database it looks up there payment
records
fine
and i can add a payment record for them with no problem??? Can anybody
help??


Are you talking about data entry in a form? or directly in the table?
Your
terminology is inconsistent here. If you're talking about a form and
subform, then I'm guessing that the subform control is not linked to the
main form via the subform control's LinkMasterFields and LinkChildFields
property, so the form is not inserting the correct foreign key field
value
into the child table. But, to provide more info, you'll need to give us
more
details.





 




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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Mixed up with Relationships..help! KrazyRed New Users 3 January 26th, 2005 05:03 AM
Deleting Relationships... Kojones General Discussion 3 December 17th, 2004 11:46 PM
Relationships getting redefined? raylitalo General Discussion 3 December 15th, 2004 08:31 PM
Not seeing all relationships in layout window jettabug General Discussion 3 June 18th, 2004 05:42 PM
Table Relationships Design Tom Database Design 1 May 5th, 2004 11:56 PM


All times are GMT +1. The time now is 10:13 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.