Hi,
I'm newby in MS Access and VB.
I have created two simple tables (as an example of the problem), student and mark. I created two forms corresponding to the tables, form1 and form2, respectively. I have connected those forms with Open form button in form1, which opens form2 for the selected student. It's works fine, but I want to add new mark for selected student, but studentId (foreign key) is always set to 0. I can do it manually, but I want hide this field from end user, and set this to works automatically.
Here is an example
I'm newby in MS Access and VB.
I have created two simple tables (as an example of the problem), student and mark. I created two forms corresponding to the tables, form1 and form2, respectively. I have connected those forms with Open form button in form1, which opens form2 for the selected student. It's works fine, but I want to add new mark for selected student, but studentId (foreign key) is always set to 0. I can do it manually, but I want hide this field from end user, and set this to works automatically.
Here is an example