G
Guest
Hello:
I have a test form where I want to copy the value of StudentID [TEXT field]
from the current record to another form. I tried the following code and I
keep getting a 2501 error message.
Private Sub OpenFrmTest_Click()
DoCmd.OpenForm "frmTest", , , "[StudentID] = " & Me.StudentID
End Sub
If I remove the 3 commas and the StudentID info, this part of the code opens
the form, so I know that’s working.
DoCmd.OpenForm "frmTestâ€
Thanks,
Robert
I have a test form where I want to copy the value of StudentID [TEXT field]
from the current record to another form. I tried the following code and I
keep getting a 2501 error message.
Private Sub OpenFrmTest_Click()
DoCmd.OpenForm "frmTest", , , "[StudentID] = " & Me.StudentID
End Sub
If I remove the 3 commas and the StudentID info, this part of the code opens
the form, so I know that’s working.
DoCmd.OpenForm "frmTestâ€
Thanks,
Robert