'Weird VBA Expected End of Statement Error

I started working on creating a custom function in Access 2010, using the VBA Editor, but I keep getting an Expected End of Statement Error.

Here's the code:

Public Function getPayTotal(ByVal StudentID As Long) As Long

Return StudentID

End Function

I have absolutely no idea why this isn't working. The debug keeps sending me back to the Return StudentID line. Am I over looking something incredibly simple?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source