Go Back   Access World Forums > Microsoft Access Discussion > General

 
Reply
 
Thread Tools Rate Thread Display Modes
Old 07-12-2019, 01:05 AM   #1
Dmitri
Newly Registered User
 
Join Date: Jul 2019
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Dmitri is on a distinguished road
A real struggle

This is so simple for experienced folks, but as a newcommer to ms access I just cannot fathom how to do this. I have 2 tables. One is "parents" and the other "tutors". The PK is ID / autonumber in both tables.

Now this is where I bang my head against the wall: On the parent table, I need a subrecord which contains the tutor that has been booked by the parent.

For example: Parent name is Diane
There are 4 tutors: Tania, Jenny, Rose, Jacky

If the parent (Diane) chooses Rose, then I want Rose's name and info in the subrecord. Somehow, what is happening is that all the parents show Rose as the tutor.

How on Earth do I stop banging my head against the wall

Dmitri is offline   Reply With Quote
Old 07-12-2019, 01:24 AM   #2
arnelgp
Registered User
 
arnelgp's Avatar
 
Join Date: May 2009
Location: somewhere out there
Posts: 7,897
Thanks: 63
Thanked 2,509 Times in 2,409 Posts
arnelgp is just really nice arnelgp is just really nice arnelgp is just really nice arnelgp is just really nice arnelgp is just really nice
Re: A real struggle

you need a junction table (table in between parent and tutor), say tblParentTutor with
fields:

ParentID (long the ID of the parent)
TutorID (long the ID of tutor)

add the parent ID and tutor to this table.

now create a query, drag the parent first, then the tblParentTutor, lastly the tutor table.
join the ID of parent table to the ParentID of the junction table.
right click on the connecting line and choose option (2).
drag the TutorID from junction table to Tutor table.
right click on the connecting line and choose option (2).
select which field you want to show in the query.
__________________
"Never stop learning, because life never stops teaching"
arnelgp is offline   Reply With Quote
Old 07-12-2019, 01:27 AM   #3
Dmitri
Newly Registered User
 
Join Date: Jul 2019
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Dmitri is on a distinguished road
Re: A real struggle

Thanks, I will follow your advice and report back. It takes me a few times to get right in databases. Teaching myself a new "career" at 53 - not easy

Dmitri is offline   Reply With Quote
Old 07-12-2019, 01:42 AM   #4
arnelgp
Registered User
 
arnelgp's Avatar
 
Join Date: May 2009
Location: somewhere out there
Posts: 7,897
Thanks: 63
Thanked 2,509 Times in 2,409 Posts
arnelgp is just really nice arnelgp is just really nice arnelgp is just really nice arnelgp is just really nice arnelgp is just really nice
Re: A real struggle

here is a sample you might want to study.
Attached Files
File Type: zip ParentTutor.zip (31.1 KB, 6 views)
__________________
"Never stop learning, because life never stops teaching"
arnelgp is offline   Reply With Quote
Old 07-12-2019, 02:30 AM   #5
Dmitri
Newly Registered User
 
Join Date: Jul 2019
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Dmitri is on a distinguished road
Talking Re: A real struggle

Thanks. I will work through your example and get back to you.

Dmitri is offline   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
relationships struggle ! coda7777 General 4 04-06-2017 06:34 AM
DLookup struggle Jan van Bekkum Reports 3 03-14-2010 04:12 PM
I really struggle with sub reports aftershokk Reports 11 07-02-2007 05:28 AM
grr struggle !!! Need expert advice Gmio Forms 4 05-16-2007 03:14 PM
If Then Else struggle kupe Modules & VBA 38 08-05-2004 06:48 AM




All times are GMT -8. The time now is 02:42 PM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Featured Forum post


Sponsored Links


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World