473,394 Members | 1,709 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Inputing date to separate tables while retaining links

I have a database which is made up of several tables "contacts",
"coaching", "clubs" etc. The Contact and coach tables are linked by an
"ID" field. The Contact and clubs table are linked a by a C_ID field.
I have a have a form to input new records and I need to tnter the "ID"
value int 2 tables to maintain the link.

As a result of a previous attempt I have contacts as a main form with
coach as a sub form. Lookin good...
I now have a situation where I need to link club info from a table of
club details. The club table has fields club_code and club_name. I
want to be able to link club_code in this to the club_code field in
contacts so that I can select a club name fron a dropdown and enter the
club id into the record in contacts.

a) How can I do this ?
B) IS this the best way to enterdata and maintain the relationship?
Nov 13 '05 #1
3 1344
I suggest you have a table of Clubs consisting of
ClubID Autonumber
ClubName
Etc

a table of Coaches
CoachID Autonumber
Coachname
Etc

a table of Contacts
ContactID Autonumner
ContactName
ClubID Long Integer
CoachID Long Integer
Etc

Then under relationships add the 3 tables and link the 2 ClubIDs from the
Contact & Club tables and link the 2 CoachIDs from the Contact and Coach
Table

If you then create a form based on the Contacts (or better a Query based on
the contacts so that the names are in alphabetical order) you can have a
list box or combo box to select the appropriate Club and Coach

HTH

Phil
"Scotty" <no****@aol.com> wrote in message
news:cb**********@sparta.btinternet.com...
I have a database which is made up of several tables "contacts",
"coaching", "clubs" etc. The Contact and coach tables are linked by an
"ID" field. The Contact and clubs table are linked a by a C_ID field.
I have a have a form to input new records and I need to tnter the "ID"
value int 2 tables to maintain the link.

As a result of a previous attempt I have contacts as a main form with
coach as a sub form. Lookin good...
I now have a situation where I need to link club info from a table of
club details. The club table has fields club_code and club_name. I
want to be able to link club_code in this to the club_code field in
contacts so that I can select a club name fron a dropdown and enter the
club id into the record in contacts.

a) How can I do this ?
B) IS this the best way to enterdata and maintain the relationship?

Nov 13 '05 #2
Phil Stanton wrote:
I suggest you have a table of Clubs consisting of
ClubID Autonumber
ClubName
Etc

a table of Coaches
CoachID Autonumber
Coachname
Etc

a table of Contacts
ContactID Autonumner
ContactName
ClubID Long Integer
CoachID Long Integer
Etc

Then under relationships add the 3 tables and link the 2 ClubIDs from the
Contact & Club tables and link the 2 CoachIDs from the Contact and Coach
Table

If you then create a form based on the Contacts (or better a Query based on
the contacts so that the names are in alphabetical order) you can have a
list box or combo box to select the appropriate Club and Coach

HTH

Phil
"Scotty" <no****@aol.com> wrote in message
news:cb**********@sparta.btinternet.com...
I have a database which is made up of several tables "contacts",
"coaching", "clubs" etc. The Contact and coach tables are linked by an
"ID" field. The Contact and clubs table are linked a by a C_ID field.
I have a have a form to input new records and I need to tnter the "ID"
value int 2 tables to maintain the link.

As a result of a previous attempt I have contacts as a main form with
coach as a sub form. Lookin good...
I now have a situation where I need to link club info from a table of
club details. The club table has fields club_code and club_name. I
want to be able to link club_code in this to the club_code field in
contacts so that I can select a club name fron a dropdown and enter the
club id into the record in contacts.

a) How can I do this ?
B) IS this the best way to enterdata and maintain the relationship?


Thanks very much for your response
I have tried "almost" that and I could not get it towork.

I had

ClubID String eg har
ClubName
Etc

a table of Coaches
CoachID String eg sco
Coachname
Etc

a table of Contacts
ContactID String eg sco
ContactName
ClubID String eg har
My problem was when I needed to enter data, I had to be able to enter
sco into coachid (in tblcoach) and contactID (in tblcontact) to mainain
the relationship. I am relatively new to all this so my reasoning may
be completely off the wall.....

Also in the form linked to tblcontacts I needed a combobox with the
clubs which would insert the clubid into tblcontacts.

If you think that the slight differences in what you suggest will make a
difference I will try it.

I have gone down the route of using mother and child forms and subforms
but that doesn't seem to work either.... Maybe it is ME !!
Nov 13 '05 #3
You should not need subforms for this.

If you want I could send you a smple database to get you started, if so
email me direct with conmtacts as the subject, and replace discussion with
phil.

Phil
"Scotty" <no****@aol.com> wrote in message
news:cb**********@titan.btinternet.com...
Phil Stanton wrote:
I suggest you have a table of Clubs consisting of
ClubID Autonumber
ClubName
Etc

a table of Coaches
CoachID Autonumber
Coachname
Etc

a table of Contacts
ContactID Autonumner
ContactName
ClubID Long Integer
CoachID Long Integer
Etc

Then under relationships add the 3 tables and link the 2 ClubIDs from the Contact & Club tables and link the 2 CoachIDs from the Contact and Coach
Table

If you then create a form based on the Contacts (or better a Query based on the contacts so that the names are in alphabetical order) you can have a
list box or combo box to select the appropriate Club and Coach

HTH

Phil
"Scotty" <no****@aol.com> wrote in message
news:cb**********@sparta.btinternet.com...
I have a database which is made up of several tables "contacts",
"coaching", "clubs" etc. The Contact and coach tables are linked by an
"ID" field. The Contact and clubs table are linked a by a C_ID field.
I have a have a form to input new records and I need to tnter the "ID"
value int 2 tables to maintain the link.

As a result of a previous attempt I have contacts as a main form with
coach as a sub form. Lookin good...
I now have a situation where I need to link club info from a table of
club details. The club table has fields club_code and club_name. I
want to be able to link club_code in this to the club_code field in
contacts so that I can select a club name fron a dropdown and enter the
club id into the record in contacts.

a) How can I do this ?
B) IS this the best way to enterdata and maintain the relationship?


Thanks very much for your response
I have tried "almost" that and I could not get it towork.

I had

ClubID String eg har
ClubName
Etc

a table of Coaches
CoachID String eg sco
Coachname
Etc

a table of Contacts
ContactID String eg sco
ContactName
ClubID String eg har
My problem was when I needed to enter data, I had to be able to enter
sco into coachid (in tblcoach) and contactID (in tblcontact) to mainain
the relationship. I am relatively new to all this so my reasoning may
be completely off the wall.....

Also in the form linked to tblcontacts I needed a combobox with the
clubs which would insert the clubid into tblcontacts.

If you think that the slight differences in what you suggest will make a
difference I will try it.

I have gone down the route of using mother and child forms and subforms
but that doesn't seem to work either.... Maybe it is ME !!

Nov 13 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Thomas Homan | last post by:
Hello, Is there a method in the FtpWebRequest that allows for preservation of the file being transferred original date and time in vs2005 vb? In the FTPSample the method is to set up stream...
7
by: joeyej | last post by:
How do I compare today's date with this string (in my inc file) so that I can set an alert if date choice i.e. May 15, 2006 not at least greater than two days from current date? <option...
5
by: NickCR_04 | last post by:
Hi all, I am (using ASP.net 2.0 in Visual Web developer 2005 Express Edit) trying to set up an asp front end to a music DB which has 2 main tables: 1) MUSIC - containing music release...
1
by: NitinSawant | last post by:
Dear, How to add links in crystal reports, e.g. I hav two reports A & B, I want to link them, A will link to B and B will link to B, also A will post parameters to report B
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.