Check the following:
1. Your [Related Reference] field has a Proxy field (you do not need one though)
2. In your Form Layout, you are probably using the [Related Reference] field in Add/Edit/View modes rather than the [Error Code] proxy field
It sounds like you are using the [Related Reference] field in your Form Layout in View mode as well as Add/Edit mode, which is causing the display of the record ID# from the parent.
You can either use a Proxy field in Add/Edit/View modes, or use the [Related Reference] field in your Form Layout for Add/Edit only, and then use a Lookup [Error Code] field in View mode.