Hi,
I have a line of code that throws runtime error 3075 when the records run out. I'm ok with that because it works for all records that actually exist. However, I need to use On Error handling for the line in italics and just throw a message box. The code I have does that, but for every single run of the code- not just just on runtime 3075. I'm pretty new to the On Error statement. Anybody have an idea of what I've done wrong?
Code:
Private Function DetectCurrentPlatform() As String
'change form according to platform
Dim Platform As String
On Error GoTo ErrMsg
Platform = Nz(DLookup("[RequestType]", "tblOrder", "[PPID] = " & getCurrentPPID & " AND [ID] = " & Me.ID), 0)
...
ErrMsg:
Dim msg As String
msg = "There are no more records under this PPID."
MsgBox msg, , "Record Navigation"
End Function