Hi,
That code should do it, is it in the exit event of the controlling field? You might need to check the options under Form Properties ... Form Validations, you should have "Show Dialog Message" set. Also you might need to set the mandatory message value, so;
if (!(this.isNull || this.rawValue == ""))
{
Population.mandatory="error";
Population.mandatoryMessage="Please enter the population";
}
else
{
Population.mandatory="disabled";
}
Regards
Bruce