This works, but I'm sure it could be much better:
Dim strYearPat, strTrain, strNumb As String
strYearPat = Year(Now) & "PAT"
strTrain = Nz(DMax("[TrainNo]", "tblTrainNo", "Left(TrainNo,4)=Year(Now())"), Year(Now) & "PAT" & 0)
strNumb = Mid(strTrain, 8) + 1
Me!TrainNo = strYearPat & strNumb