John W. Vinson Please assist.

J

James

Hi as for the more information ok here goes....

Basically I have now set up my One - To - Many
relationship from tblMP3List (The main Table) to
tblMP3Title (Which has the MP3 Titles in)... To get the
data in the tblMP3Title do I just copy it over?

Also when I am adding data into my form (based on
tblMP3List) so when I add data it comes up with the Title
of the MP3 in the relevant field and then one of the
titles I put in the list... How do I get it to place
another record in the table? plus it dosent puit the
record in the tblMP3Title so the title is not going in
there?

I have the following in the tables:

tblMP3List

MP3Title (Text Field)
MP3TitleID (AutoNumber) (Key Field)
MP3's on CD (Text Field)

tblMP3Title

MP3Title (Text Field)
MP3TitleID (AutoNumber) (Key Field)

Joined in a One - To - Many Relationship joined by
MP3TitleID in both fields.....

Many Thanks

James





How do I get this to work?


I have done this but it says the relationship is one - to -
one...

This suggests that the field to which you're linking in
the Folders
table has a unique Index, such as a Primary Key. Make sure
you're not
linking to the Primary Key; if you're not, check the
Indexes on the
table and make sure there isn't a unique Index on the
field.
How do I get it to be a one - to - Many relationship...
plus I have done the tables as you requested... I have no
data in my new table is there a way that the relationship
pulls the records across...

That's NOT HOW RELATIONSHIPS WORK.

The whole *point* of a relational database is to avoid
redundancy,
thereby avoiding redundancy. A relationship *prevents* you
form adding
"orphan" records, e.g. folders which have no valid Title;
it doesn't
automatically add new records to the related table (and
you wouldn't
want it to do so!)

If you could explain a bit more about what these two
tables are and
what you expect, someone should be able to clarify how to
do what you
want.
 
J

John Vinson

I have the following in the tables:

tblMP3List

MP3Title (Text Field)
MP3TitleID (AutoNumber) (Key Field)
MP3's on CD (Text Field)

tblMP3Title

MP3Title (Text Field)
MP3TitleID (AutoNumber) (Key Field)

Joined in a One - To - Many Relationship joined by
MP3TitleID in both fields.....

That's where you went wrong. YOU CANNOT join an Autonumber (a unique,
arbitrary id) in one table to an Autonumber (a different, unrelated,
unique abitrary id) in a different table and expect to get anything
useful!

Instead, use a Long Integer field in the "many" side table, NOT its
Primary Key, and link IT to the autonumber in the "one" side table.
I'm not completely clear which table is which here - does one MP3 have
many titles, or does each title have multiple MP3's? Either way the
logic is the same; use an Autonumber (or other unique) primary key in
the "one" side table, and a field of matching datatype (Long Integer
if the primary key is an Autonumber) in the "many" side table. To do
data entry use a Form based on the "one" side table with a Subform
based on the "many".
 
J

James

Hi I have set up the relationship the following way:

I have the tblMP3Title as the one side
the tblMP3List as the many side...

This to me seems logical as I will need one title to many
Folders on the CD...

But still when I add my data through the input form it
adds it to the tblMP3List and nothing in the tblMP3Title...

What do I need to do with my Input Form so that this works?

Many Thanks

James
 
J

John Vinson

But still when I add my data through the input form it
adds it to the tblMP3List and nothing in the tblMP3Title...

What do I need to do with my Input Form so that this works?

You nded a Form based on tblMP3Title (with the unique title); and a
Subform based on tblMP3List (with the folder names). You'll need to
enter information in both the form and the subform. Relationships do
NOT automagically add new data to a table just because you add data to
some other table!
 
J

James

Ok.. Many Thanks for that I have learned alot from this...

I now have one other question... When I come to add a new
record I have a cmdButton to do this... How can I now get
it to clear both the main form and the subform for a new
entry for data?

Many Thanks for all your help its much appreciated...

James...
 
J

James

Hi I would like to know as well how I get all the records
from tblMP3List to tblMP3Title so that they properly
refrence in... Is there an easy way of doing this?

Many Thanks

James
 
J

James

Hi just one more thing I have spotted... (Sorry about all
the posts)

When I am looking through the records I have a next and
previous buttons but they go off the records in
tblMP3List... This I have no problem with but I would like
it so that I goes from MP3 Title to MP3 Title... How do I
achieve this? When I add another table to the query like
the MP3Title one it displayes nothing...

What must I do here?

Many Thanks

James
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top