Some carriers have more than one frequent traveller field. I understand that on Air New Zealand there's one field for the programme you are crediting your flights to (in your case UA), and another optional field for another frequent flyer number (i.e. the programme you have status with, in your case AC). This may not still be the case, and even if it is, it may not apply to other Star carriers.