On User Input error, evaluating STRING

On User Input error, evaluating STRING

I have a subform that has on user input coding that is supposed to auto fill the a majority of the form. When I use the form on its on it works perfectly. When I use it through the main form the sub-form gives this error. 

I understand where the error is occurring I'm just not sure what is wrong with it. Especially when it works find on the main page.