relationships
The UK's Number 1 for Microsoft Office Training Add this page to your favourites/bookmarksBookmark page
 
View printable version of pagePrintable version
Plus One Google
Customer: Sign in
Delegate: Sign in
Trainer: Log in

Forum home » Delegate support and help forum » Microsoft Access Training and help » Relationships

Relationships

resolvedResolved · Medium Priority · Version 2003

replyReply Tue 3 Aug 2010, 11:35Delegate Mandy said...

Mandy has attended:
Access Intermediate course

Relationships

I am designing a student database to hold records of all our students and the courses they have attended. I have a Student Table, with name, address, etc and a Course Table with course names and dates and a link table to join the two - pretty much as the Video Rental database we discussed in training. I am now trying to design a Student Details form which has a Course sub form and shows one student record and list all the courses they have attended. But currently the course sub form lists courses attended by ALL students - how can I get the subform to show only the course records that relate to the student whose record is shown in the main form?
Sorry if this is confusing - it's difficult to put into words! I am sure its straightforward but have tried everything I can think of.

For upcoming training course dates see: Pricing & availability

replyReply Tue 10 Aug 2010, 10:58Trainer Anthony said...

RE: Relationships

Hi Mandy, thanks for your query. This sounds like you either need to alter the join type between the two linked tables or run a query to filter out the records you want.

In the relationships panel (Tools - Relationships) double click on the connector between your linked tables and alter the options in "Join Type". In that dialog you can set what recordset you want when you run queries using these tables, in particular whether you want all records regardless of whether there are corresponding records in each table, or just those which appear in one of the tables. If your tables are set up correctly I'm almost certain this will have the effect you are after.

Failing that, create a query that includes the "Is Null" criteria to strip out fields which do not have values in them. This may have the desired effect, but I would try the above option first.

Hope this helps,

Anthony

replyReply Mon 16 Aug 2010, 11:47Delegate Mandy said...

RE: Relationships

I had alreay set up the relationships. I managed to solve this myself aby using fields from all 3 tables in the form.

 

Please browse our web site to find out more about
access course and other Microsoft training courses.

Access tip:

Hiding Multiple Table columns

If you want to hide non-adjacent Access table columns. In Datasheet view, open the table that contains the columns you want to hide.

On the Format menu, click Unhide Columns.
In the Unhide Columns dialog box, clear the check box next to the name of each column you want to hide.
Click Close.

This method makes having to use the Hide Columns command repeatedly unnecessary

View all Access hints and tips


Microsoft Certified Partner Accredited Training Provider: Institute of IT Training Institute of Leadership and Management - Certified Courses Security Seal verified by visa, mastercard securecard