In a form the syntax would be
RTrim(Me.LastName)
In a query, something like
TrimmedLastName: RTrim([LastName])
then use the Calculated Field named TrimmedLastName instead of the LastName field in forms or reports.
What exactly are you using this for? I ask because in Access, you seldom have trailing spaces, which is what RTrim() trims off, unless you've imported data from somewhere outside of Access or you've copied and pasted data from somewhere into Access.