new2access123
Registered User.
- Local time
- Today, 07:08
- Joined
- Feb 5, 2010
- Messages
- 12
I have created a form containing a subform in datasheet view.

This is my ERD.

Form Select:
SELECT ProjectToParticipant.ProjectID, Participant.ParticipantID, Participant.NameFirst, Participant.NameLast, Participant.NameMiddle
FROM Participant INNER JOIN ProjectToParticipant ON Participant.ParticipantID = ProjectToParticipant.ParticipantID
WHERE (((ProjectToParticipant.ProjectID)=[Forms]![ParticipantInfo]![cboProject]));
Subform select:
SELECT ParticipantTestScores.ParticipantID, ARTest.TestName, ParticipantTestScores.Score, ParticipantTestScores.Right, ParticipantTestScores.Location, ParticipantTestScores.Motion, ParticipantTestScores.BodyPosition
FROM ARTest INNER JOIN ParticipantTestScores ON ARTest.ARTestID = ParticipantTestScores.ARTestID;
The master and child link fields are: ParticipantID
To add a test to the datasheet the user drops the list to select a test.

When the test name is selected I get this error.

1. Why am i getting this error? When I click help it says the table is locked. Which table? I have not locked any table and no tables are open in another window.
2. When I close the form and look at the ARTest table a new record has been added.

The objective of the datasheetis to add a record to the ParticipantTestScores table.
- When the user selects a test name the key for that test should automaticly populate ParticipantTestScores.ARTestID
- The key for the participant should populate automaticly populate ParticipantTestScores.ParticipantID
What is the correct way to do this?
Thanks

This is my ERD.

Form Select:
SELECT ProjectToParticipant.ProjectID, Participant.ParticipantID, Participant.NameFirst, Participant.NameLast, Participant.NameMiddle
FROM Participant INNER JOIN ProjectToParticipant ON Participant.ParticipantID = ProjectToParticipant.ParticipantID
WHERE (((ProjectToParticipant.ProjectID)=[Forms]![ParticipantInfo]![cboProject]));
Subform select:
SELECT ParticipantTestScores.ParticipantID, ARTest.TestName, ParticipantTestScores.Score, ParticipantTestScores.Right, ParticipantTestScores.Location, ParticipantTestScores.Motion, ParticipantTestScores.BodyPosition
FROM ARTest INNER JOIN ParticipantTestScores ON ARTest.ARTestID = ParticipantTestScores.ARTestID;
The master and child link fields are: ParticipantID
To add a test to the datasheet the user drops the list to select a test.

When the test name is selected I get this error.

1. Why am i getting this error? When I click help it says the table is locked. Which table? I have not locked any table and no tables are open in another window.
2. When I close the form and look at the ARTest table a new record has been added.

The objective of the datasheetis to add a record to the ParticipantTestScores table.
- When the user selects a test name the key for that test should automaticly populate ParticipantTestScores.ARTestID
- The key for the participant should populate automaticly populate ParticipantTestScores.ParticipantID
What is the correct way to do this?
Thanks