What happened when you tried the code? Error, nothing, bad result? We need more information...
Probably you want something like Forms![Form2].Filter = "[student no] = " & Forms![form 1]![student no]
Forms![Form2].FilterOn = True
or
DoCmd.OpenForm "Form2",,,"[student no] = " & Forms![form...