When trying to establish relationships in Access, sometimes you might get errors saying that the ‘database is locked’. There are two reasons for this:
- The parent table needs to have ‘AutoNumber’ type for the primary key for ‘FieldWhatever’. Then the child table for ‘FieldWhatever’ has to have ‘Number’ as its type.
- The other reason is that you must close all open tables in order to establish a relationship. It’s always a good idea to right click on an active tab and close all in order to clear whatever you’re viewing before looking at relationships.
You can’t have one-to-many relationships with more than one parent to more than one child. So go to Relationship Tools [tab] > Design > All Relationships and then make sure to delete whatever relationships that you don’t need that could be tying up the new relationship you’re trying to establish.
Once you’ve fixed your relationships, then you can use cascading tables (providing that you checked ‘enforce integrity’ when you were making the one-to-many relationships) to plug in which students are attending which classes.