1. Here is the SQL for the parameterized query:
SELECT [Test Parameters].[Class Number], [Test Parameters].TestSequenceNo
FROM Class INNER JOIN [Test Parameters] ON (Class.[Class Number] = [Test Parameters].[Class Number]) AND (Class.[Class Number] = [Test Parameters].[Class Number])
WHERE ((([Test Parameters].[Class Number]) Like [forms]![Tests and Grades].[myclasstestselector] & "*"))
ORDER BY [Test Parameters].[Class Number] DESC , [Test Parameters].TestSequenceNo;
2. "Don't know why the combobox sometimes shows only 2014-1 data. Why is this value with hyphen on form but not in combobox?"
For better or worse, I created a mask for this field (Class Number) hoping that people wouldn't have to type the dash. I eventually tried to set it so that the dash is stored, but not successfully as it seems as there are situations like you see in which the dash does not appear. While annoying, its not a show stopper.
3. "You don't want to allow changing the Class where - on the main form combobox or on the subform?"
On both the form and subform. On the form, the Class is associated with the test parameter record. I think on the form I can just change Enabled to No.
On the sub-form, the Class is associated with the Student and I only want to select a student who is in the Class. I think I can add Class as a 2nd column in the lookup so at least you would see before selecting if you have the right student.
(Additionally, I should not allow more than 1 record to be created per student-but I can deal with that later.)
4. Database Analysis
I can't get the database below 2.585 compressed. Could I email or otherwise send outside of the forum?
Thanks so much for your interest!